summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-08-09 11:23:36 +0200
committerSander Vrijders <[email protected]>2016-08-09 11:23:36 +0200
commit1dde324905796df4d7e468d7f0de027bb8dcedae (patch)
tree5f55b8d82826fc182c9408350200b7ecaa932a27 /src/ipcpd
parent2bb767b785217fb6f86ce0242f13b2aa59920dbe (diff)
parent18e440197cae6d537765a4de6a915f074dce4de5 (diff)
downloadouroboros-1dde324905796df4d7e468d7f0de027bb8dcedae.tar.gz
ouroboros-1dde324905796df4d7e468d7f0de027bb8dcedae.zip
Merged in dstaesse/ouroboros/be-bugfixing (pull request #191)
Bugfixes
Diffstat (limited to 'src/ipcpd')
-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);
}