summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2016-07-06 11:53:19 +1200
committerGarming Sam <garming@samba.org>2016-07-15 10:01:28 +0200
commitb7b229a424cfe6a2bbe7b091c93a6f09b2132975 (patch)
tree37ca3615229c3f4134c1b0945380477243b41f9a /source4/dsdb/samdb/ldb_modules/repl_meta_data.c
parent5d201591e3955afaae38a1bbeb8f6cb3b8ab8c89 (diff)
downloadsamba-b7b229a424cfe6a2bbe7b091c93a6f09b2132975.tar.gz
repl_meta_data: free context on error in replmd_modify_la_delete()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/repl_meta_data.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index d952868917c..efd1932a9ec 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -2210,6 +2210,7 @@ static int replmd_modify_la_delete(struct ldb_module *module,
invocation_id = samdb_ntds_invocation_id(ldb);
if (!invocation_id) {
+ talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -2234,8 +2235,10 @@ static int replmd_modify_la_delete(struct ldb_module *module,
ldb_asprintf_errstring(ldb, "Attribute %s doesn't exist for target GUID %s",
el->name, GUID_buf_string(&p->guid, &buf));
if (ldb_attr_cmp(el->name, "member") == 0) {
+ talloc_free(tmp_ctx);
return LDB_ERR_UNWILLING_TO_PERFORM;
} else {
+ talloc_free(tmp_ctx);
return LDB_ERR_NO_SUCH_ATTRIBUTE;
}
}
@@ -2245,8 +2248,10 @@ static int replmd_modify_la_delete(struct ldb_module *module,
ldb_asprintf_errstring(ldb, "Attribute %s already deleted for target GUID %s",
el->name, GUID_buf_string(&p->guid, &buf));
if (ldb_attr_cmp(el->name, "member") == 0) {
+ talloc_free(tmp_ctx);
return LDB_ERR_UNWILLING_TO_PERFORM;
} else {
+ talloc_free(tmp_ctx);
return LDB_ERR_NO_SUCH_ATTRIBUTE;
}
}