svn commit: samba r17927 - in branches/SAMBA_3_0_23/source/libsmb: .
jra at samba.org
jra at samba.org
Wed Aug 30 01:34:23 GMT 2006
Author: jra
Date: 2006-08-30 01:34:22 +0000 (Wed, 30 Aug 2006)
New Revision: 17927
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17927
Log:
Fix memory leak in resolve_ads(). Parent talloc
context was created but never destroyed. Jerry,
you might want to grab this for 3.0.23c. Wonder
why none of the static checkers picked this up.
Jeremy.
Modified:
branches/SAMBA_3_0_23/source/libsmb/namequery.c
Changeset:
Modified: branches/SAMBA_3_0_23/source/libsmb/namequery.c
===================================================================
--- branches/SAMBA_3_0_23/source/libsmb/namequery.c 2006-08-29 22:50:49 UTC (rev 17926)
+++ branches/SAMBA_3_0_23/source/libsmb/namequery.c 2006-08-30 01:34:22 UTC (rev 17927)
@@ -1044,6 +1044,7 @@
status = ads_dns_query_dcs( ctx, name, &dcs, &numdcs );
if ( !NT_STATUS_IS_OK( status ) ) {
+ talloc_destroy(ctx);
return False;
}
@@ -1053,6 +1054,7 @@
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 @@
(*return_count)++;
}
- TALLOC_FREE( dcs );
-
+ talloc_destroy(ctx);
return True;
}
More information about the samba-cvs
mailing list