summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-05 10:25:02 +0200
committerVolker Lendecke <vl@samba.org>2008-06-05 10:56:18 +0200
commitd261e16cfd4afc19db0c26cfb2b6389c9c174310 (patch)
treee286190cd3bf195eeea58dc2ae6f37c2b690e4cb /source3/libads
parent19e5ee0e094c563521e6515294f448f7136a928f (diff)
downloadsamba-d261e16cfd4afc19db0c26cfb2b6389c9c174310.tar.gz
samba-d261e16cfd4afc19db0c26cfb2b6389c9c174310.tar.bz2
samba-d261e16cfd4afc19db0c26cfb2b6389c9c174310.zip
Fix a memleak in ads_find_dc() in case get_sorted_dc_list() fails
This is really not a proper place to fix this, but as get_gc_list() and friends are about to be replaced anyway, just work around the broken existing API (This used to be commit df8d089bc63c2a52cbdf3504cded8df620a59902)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 37c0c4d0ac..fc336d988b 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -319,6 +319,7 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads)
status = get_sorted_dc_list(realm, sitename, &ip_list, &count, got_realm);
if (!NT_STATUS_IS_OK(status)) {
+ SAFE_FREE(ip_list);
/* fall back to netbios if we can */
if ( got_realm && !lp_disable_netbios() ) {
got_realm = False;