summaryrefslogtreecommitdiffstats
path: root/source4/lib/ldb-samba
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-12 11:31:30 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-12 16:45:45 +0200
commitbbb0b31911c41091dd79da3612b0227c68139da7 (patch)
tree38c1dbbf83764b2b141e6c1e9b488470f462715a /source4/lib/ldb-samba
parent14974ba1f1e23c3f960cc1c0dd4a1dcf0e5c5601 (diff)
downloadsamba-bbb0b31911c41091dd79da3612b0227c68139da7.tar.gz
samba-bbb0b31911c41091dd79da3612b0227c68139da7.tar.xz
samba-bbb0b31911c41091dd79da3612b0227c68139da7.zip
s4:ldif_read_prefixMap - don't cause memory leaks on error conditions
Diffstat (limited to 'source4/lib/ldb-samba')
-rw-r--r--source4/lib/ldb-samba/ldif_handlers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c
index f335d6c4c9..480335f411 100644
--- a/source4/lib/ldb-samba/ldif_handlers.c
+++ b/source4/lib/ldb-samba/ldif_handlers.c
@@ -522,11 +522,11 @@ static int ldif_read_prefixMap(struct ldb_context *ldb, void *mem_ctx,
blob = talloc_zero(tmp_ctx, struct prefixMapBlob);
if (blob == NULL) {
- talloc_free(blob);
+ talloc_free(tmp_ctx);
return -1;
}
- ndr_err = ndr_pull_struct_blob(in, blob, blob,
+ ndr_err = ndr_pull_struct_blob(in, tmp_ctx, blob,
(ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
ndr_err = ndr_push_struct_blob(out, mem_ctx,