summaryrefslogtreecommitdiff
path: root/src/ipcpd/local/main.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-14 11:39:37 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-14 12:14:00 +0200
commitbe68864173cf12d9998e4dbe73d876d8974a2ec1 (patch)
tree12c2b47b1612b4f6c75c68d228b63b699bb6494a /src/ipcpd/local/main.c
parent10c5059713863321033f58cbc35cc6ac41cd3e30 (diff)
downloadouroboros-be68864173cf12d9998e4dbe73d876d8974a2ec1.tar.gz
ouroboros-be68864173cf12d9998e4dbe73d876d8974a2ec1.zip
ipdpd: fixed flow deallocation in local ipcpd
Now correctly deallocates the local fd if the remote already deallocated the flow.
Diffstat (limited to 'src/ipcpd/local/main.c')
-rw-r--r--src/ipcpd/local/main.c4
1 files changed, 3 insertions, 1 deletions
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;