diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-02-03 17:07:18 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2015-02-18 10:25:07 +0100 |
commit | 4c44ee6bdba65d2857d83e80ffc7b6a1dd478f45 (patch) | |
tree | df483e6d3d79f5039bd07936a69daea2998a0654 | |
parent | a12559d7bd6c8c4a8d836c1228949125a16350e7 (diff) | |
download | socket_wrapper-4c44ee6bdba65d2857d83e80ffc7b6a1dd478f45.tar.gz socket_wrapper-4c44ee6bdba65d2857d83e80ffc7b6a1dd478f45.tar.xz socket_wrapper-4c44ee6bdba65d2857d83e80ffc7b6a1dd478f45.zip |
swrap: If we remove the socket_info also unlink the unix socket
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | src/socket_wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } } |