summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/socket_wrapper/socket_wrapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index eb1d67fbeb..1188c4e538 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/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);
}
}