mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r19327: fixed a leak in ldif_canonicalise_objectCategory()
(This used to be commit 5cc92d915b
)
This commit is contained in:
parent
915c281deb
commit
64eed1e78e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user