git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
223701c
)
r19289: fixed a memory leak in ldb_dn_string_compose()
author
Andrew Tridgell
<tridge@samba.org>
Sun, 15 Oct 2006 10:11:15 +0000
(10:11 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:21:02 +0000
(14:21 -0500)
(This used to be commit
669aa1424c7a931f57856af0cd4a6f6f4a60b823
)
source4/lib/ldb/common/ldb_dn.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/common/ldb_dn.c
b/source4/lib/ldb/common/ldb_dn.c
index d035b0d3c2e21ed471b4b21e66bb07faf9cd7513..2902309f10024aee9e74148d108e56e83e5ed9f5 100644
(file)
--- a/
source4/lib/ldb/common/ldb_dn.c
+++ b/
source4/lib/ldb/common/ldb_dn.c
@@
-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;
}