diff options
author | Gerald Carter <jerry@samba.org> | 2006-08-30 17:10:06 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-08-30 17:10:06 +0000 |
commit | 6d2d378813250b0b3dc2575802375014d3903ba0 (patch) | |
tree | 54f7a0f569c9dee4f61af6b5f7f65bcc5555f62e /source | |
parent | 0a00d6c8a46ad8f550caec5de964a062c5c46aee (diff) | |
download | samba-6d2d378813250b0b3dc2575802375014d3903ba0.tar.gz samba-6d2d378813250b0b3dc2575802375014d3903ba0.tar.xz samba-6d2d378813250b0b3dc2575802375014d3903ba0.zip |
r17935: grab jeremy's memory leak fix and update the release notes
Diffstat (limited to 'source')
-rw-r--r-- | source/libsmb/namequery.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index 57a74ea3c3e..eac63f53a2a 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -1044,6 +1044,7 @@ static BOOL resolve_ads(const char *name, int name_type, status = ads_dns_query_dcs( ctx, name, &dcs, &numdcs ); if ( !NT_STATUS_IS_OK( status ) ) { + talloc_destroy(ctx); return False; } @@ -1053,6 +1054,7 @@ static BOOL resolve_ads(const char *name, int name_type, if ( (*return_iplist = SMB_MALLOC_ARRAY(struct ip_service, numaddrs)) == NULL ) { DEBUG(0,("resolve_ads: malloc failed for %d entries\n", numaddrs )); + talloc_destroy(ctx); return False; } @@ -1096,8 +1098,7 @@ static BOOL resolve_ads(const char *name, int name_type, (*return_count)++; } - TALLOC_FREE( dcs ); - + talloc_destroy(ctx); return True; } |