Author: gd
Date: 2006-09-19 02:04:11 +0000 (Tue, 19 Sep 2006)
New Revision: 18670

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18670

Log:
Fix memleaks.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/ldap_schema.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap_schema.c
===================================================================
--- branches/SAMBA_3_0/source/libads/ldap_schema.c      2006-09-19 02:03:15 UTC 
(rev 18669)
+++ branches/SAMBA_3_0/source/libads/ldap_schema.c      2006-09-19 02:04:11 UTC 
(rev 18670)
@@ -165,10 +165,12 @@
        }
 
        if ( (schema = ads_pull_string(ads, mem_ctx, res, 
"schemaNamingContext")) == NULL ) {
+               ads_msgfree(ads, res);
                return ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
        }
 
        if ( (*schema_path = talloc_strdup(mem_ctx, schema)) == NULL ) {
+               ads_msgfree(ads, res);
                return ADS_ERROR(LDAP_NO_MEMORY);
        }
 

Reply via email to