svn commit: samba r19289 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
tridge at samba.org
tridge at samba.org
Sun Oct 15 10:11:16 GMT 2006
Author: tridge
Date: 2006-10-15 10:11:15 +0000 (Sun, 15 Oct 2006)
New Revision: 19289
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19289
Log:
fixed a memory leak in ldb_dn_string_compose()
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2006-10-15 09:16:41 UTC (rev 19288)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2006-10-15 10:11:15 UTC (rev 19289)
@@ -848,7 +848,7 @@
struct ldb_dn *ldb_dn_string_compose(void *mem_ctx, const struct ldb_dn *base, const char *child_fmt, ...)
{
- struct ldb_dn *dn;
+ struct ldb_dn *dn, *dn1;
char *child_str;
va_list ap;
@@ -860,9 +860,11 @@
if (child_str == NULL) return NULL;
- dn = ldb_dn_compose(mem_ctx, ldb_dn_explode(mem_ctx, child_str), base);
+ dn1 = ldb_dn_explode(mem_ctx, child_str);
+ dn = ldb_dn_compose(mem_ctx, dn1, base);
talloc_free(child_str);
+ talloc_free(dn1);
return dn;
}
More information about the samba-cvs
mailing list