swrap: Do not leak the socket_info we just removed.
authorAndreas Schneider <asn@samba.org>
Fri, 24 Oct 2014 09:22:15 +0000 (11:22 +0200)
committerAndreas Schneider <asn@samba.org>
Fri, 24 Oct 2014 12:52:37 +0000 (14:52 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
src/socket_wrapper.c

index 82e57376c35166c0234fed0785e05b24bd45179c..eb1d67fbeba04e21cc5c279bc50491f01ce875b4 100644 (file)
@@ -1418,6 +1418,7 @@ static void swrap_remove_stale(int fd)
 
                if (si->fds == NULL) {
                        SWRAP_DLIST_REMOVE(sockets, si);
+                       free(si);
                }
        }
 }