summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index dd370005..e0dd1b60 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -93,6 +93,9 @@ void * ipcp_main_loop(void * o)
return (void *) 1;
}
+ pthread_cleanup_push((void(*)(void *)) close,
+ (void *) &sockfd);
+
free(sock_path);
while (true) {
@@ -259,5 +262,7 @@ void * ipcp_main_loop(void * o)
close(lsockfd);
}
+ pthread_cleanup_pop(0);
+
return NULL;
}