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:
9817cc2
)
r19327: fixed a leak in ldif_canonicalise_objectCategory()
author
Andrew Tridgell
<tridge@samba.org>
Mon, 16 Oct 2006 11:03:48 +0000
(11:03 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:21:10 +0000
(14:21 -0500)
source/lib/ldb/samba/ldif_handlers.c
patch
|
blob
|
history
diff --git
a/source/lib/ldb/samba/ldif_handlers.c
b/source/lib/ldb/samba/ldif_handlers.c
index b490c8f005aa23f3470f904ce06bdb6768d691c7..46eac2295d6a52c5ec74e0b5ddddb7e6947a1922 100644
(file)
--- a/
source/lib/ldb/samba/ldif_handlers.c
+++ b/
source/lib/ldb/samba/ldif_handlers.c
@@
-296,7
+296,7
@@
static int ldif_canonicalise_objectCategory(struct ldb_context *ldb, void *mem_c
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
@@
static int ldif_canonicalise_objectCategory(struct ldb_context *ldb, void *mem_c
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;
}