1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

r19289: fixed a memory leak in ldb_dn_string_compose()

(This used to be commit 669aa1424c)
This commit is contained in:
Andrew Tridgell 2006-10-15 10:11:15 +00:00 committed by Gerald (Jerry) Carter
parent 223701c638
commit d0ba572fab

View File

@ -848,7 +848,7 @@ failed:
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 @@ struct ldb_dn *ldb_dn_string_compose(void *mem_ctx, const struct ldb_dn *base, c
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;
}