nwrap: Don't leak memory from gethostbyname*() functions
[samba.git] / 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;
 }