From be68864173cf12d9998e4dbe73d876d8974a2ec1 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 14 Jun 2016 11:39:37 +0200 Subject: ipdpd: fixed flow deallocation in local ipcpd Now correctly deallocates the local fd if the remote already deallocated the flow. --- src/ipcpd/local/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ipcpd/local') diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index cb20a336..e7db58b6 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -519,7 +519,9 @@ static int ipcp_local_flow_dealloc(int port_id) bmp_release(_ap_instance->fds, fd); - _ap_instance->in_out[_ap_instance->in_out[fd]] = -1; + if (_ap_instance->in_out[fd] != -1) + _ap_instance->in_out[_ap_instance->in_out[fd]] =-1; + _ap_instance->in_out[fd] = -1; _ap_instance->flows[fd].state = FLOW_NULL; -- cgit v1.2.3