diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-08 21:06:55 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-08 21:06:55 +0200 |
commit | c2b7a0bf9978091c9a51b72fdbd94cc9286041df (patch) | |
tree | 3199b3fee866aee338b9019f6034654aacd5a9e3 /src | |
parent | 6a67e34466dff692fbfc4e6cc19cd4958c697450 (diff) | |
download | ouroboros-c2b7a0bf9978091c9a51b72fdbd94cc9286041df.tar.gz ouroboros-c2b7a0bf9978091c9a51b72fdbd94cc9286041df.zip |
ipcpd: Fix missing close of lsockfd
Diffstat (limited to 'src')
-rw-r--r-- | src/ipcpd/ipcp.c | 3 |
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); } |