summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/ipcp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 4f3e6799..1c4fab94 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -103,7 +103,13 @@ int ipcp_parse_arg(int argc, char * argv[])
static void close_ptr(void * o)
{
+ char * name = ipcp_sock_path(getpid());
close(*((int *) o));
+
+ if (unlink(name))
+ LOG_DBG("Could not unlink %s.", name);
+
+ free(name);
}
static void clean_msg(void * msg)