nwrap: Don't leak memory from gethostbyname*() functions
authorAndreas Schneider <asn@samba.org>
Fri, 20 Nov 2015 08:38:16 +0000 (09:38 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:32 +0000 (12:25 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib/nss_wrapper/nss_wrapper.c

index a8c97e1a461f3a95866f0b55a4e9abc76d9e8971..be977dfad96c138fb3b7500e22ae9a076234a7c2 100644 (file)
@@ -5577,6 +5577,9 @@ void nwrap_destructor(void)
                nwrap_he_global.num = 0;
        }
 
+       free(user_addrlist.items);
+       free(user_addrlist2.items);
+
        hdestroy();
        NWRAP_UNLOCK_ALL;
 }