summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-08 21:06:55 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-08 21:06:55 +0200
commitc2b7a0bf9978091c9a51b72fdbd94cc9286041df (patch)
tree3199b3fee866aee338b9019f6034654aacd5a9e3 /src/ipcpd/ipcp.c
parent6a67e34466dff692fbfc4e6cc19cd4958c697450 (diff)
downloadouroboros-c2b7a0bf9978091c9a51b72fdbd94cc9286041df.tar.gz
ouroboros-c2b7a0bf9978091c9a51b72fdbd94cc9286041df.zip
ipcpd: Fix missing close of lsockfd
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 9ecc411d..839a5a9b 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -141,6 +141,8 @@ void * ipcp_main_loop(void * o)
break;
}
+ pthread_cleanup_push(close_ptr, (void *) &lsockfd);
+
count = read(lsockfd, buf, IPCP_MSG_BUF_SIZE);
if (count <= 0) {
LOG_ERR("Failed to read from socket");
@@ -278,6 +280,7 @@ void * ipcp_main_loop(void * o)
}
free(buffer.data);
+ pthread_cleanup_pop(true);
}