svn commit: samba r19327 - in branches/SAMBA_4_0/source/lib/ldb/samba: .

tridge at samba.org tridge at samba.org
Mon Oct 16 11:03:49 GMT 2006


Author: tridge
Date: 2006-10-16 11:03:48 +0000 (Mon, 16 Oct 2006)
New Revision: 19327

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

Log:

fixed a leak in ldif_canonicalise_objectCategory()

Modified:
   branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c	2006-10-16 11:03:12 UTC (rev 19326)
+++ branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c	2006-10-16 11:03:48 UTC (rev 19327)
@@ -296,7 +296,7 @@
 					    const struct ldb_val *in, struct ldb_val *out)
 {
 	struct ldb_dn *dn1 = NULL;
-	char *oc1;
+	char *oc1, *oc2;
 
 	dn1 = ldb_dn_explode(mem_ctx, (char *)in->data);
 	if (dn1 == NULL) {
@@ -308,9 +308,11 @@
 		return -1;
 	}
 
-	oc1 = ldb_casefold(ldb, mem_ctx, oc1);
-	out->data = (void *)oc1;
-	out->length = strlen(oc1);
+	oc2 = ldb_casefold(ldb, mem_ctx, oc1);
+	out->data = (void *)oc2;
+	out->length = strlen(oc2);
+	talloc_free(oc1);
+	talloc_free(dn1);
 	return 0;
 }
 



More information about the samba-cvs mailing list