swrap: If we remove the socket_info also unlink the unix socket
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 3 Feb 2015 16:07:18 +0000 (17:07 +0100)
committerAndreas Schneider <asn@samba.org>
Wed, 18 Feb 2015 09:25:07 +0000 (10:25 +0100)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
src/socket_wrapper.c

index eb1d67fbeba04e21cc5c279bc50491f01ce875b4..1188c4e538892088b01ec1c1bea728314b6a6765 100644 (file)
@@ -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);
                }
        }