From 675ecdd5babbcf2d87e807e21375a4c0d81dfa14 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 6 May 2004 23:16:52 +0000 Subject: r539: Mem leak fixes from kawasa_r@itg.hitachi.co.jp Jeremy. (This used to be commit 8fe47b0bf27a8ae690ab0fcff377c8fc12919f43) --- source3/libsmb/namequery_dc.c | 4 +++- source3/nsswitch/winbindd_wins.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c index 31d759e0d2..0c9f19313c 100644 --- a/source3/libsmb/namequery_dc.c +++ b/source3/libsmb/namequery_dc.c @@ -49,8 +49,10 @@ static BOOL ads_dc_name(const char *domain, const char *realm, struct in_addr *d ads_connect(ads); #endif - if (!ads->config.realm) + if (!ads->config.realm) { + ads_destroy(&ads); return False; + } fstrcpy(srv_name, ads->config.ldap_server_name); strupper_m(srv_name); diff --git a/source3/nsswitch/winbindd_wins.c b/source3/nsswitch/winbindd_wins.c index 59d600d1ea..6b37e5bcf4 100644 --- a/source3/nsswitch/winbindd_wins.c +++ b/source3/nsswitch/winbindd_wins.c @@ -106,6 +106,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) for ( i=0; i<(*count); i++ ) return_ip[i] = ret[i].ip; + free( ret ); return return_ip; } -- cgit