From 4c44ee6bdba65d2857d83e80ffc7b6a1dd478f45 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 3 Feb 2015 17:07:18 +0100 Subject: swrap: If we remove the socket_info also unlink the unix socket Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- src/socket_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index eb1d67f..1188c4e 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -1418,6 +1418,9 @@ static void swrap_remove_stale(int fd) if (si->fds == NULL) { SWRAP_DLIST_REMOVE(sockets, si); + if (si->un_addr.sun_path[0] != '\0') { + unlink(si->un_addr.sun_path); + } free(si); } } -- cgit