swrap: Do not leak the socket_info we just removed.
[samba.git] / lib / socket_wrapper / 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);
                }
        }
 }