1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

replmd_modify_delete: check talloc_new()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2016-06-30 15:43:33 +12:00 committed by Garming Sam
parent ebed182e34
commit 5d201591e3

View File

@ -2173,7 +2173,7 @@ static int replmd_modify_la_delete(struct ldb_module *module,
{
unsigned int i;
struct parsed_dn *dns, *old_dns;
TALLOC_CTX *tmp_ctx = talloc_new(msg);
TALLOC_CTX *tmp_ctx = NULL;
int ret;
const struct GUID *invocation_id;
struct ldb_context *ldb = ldb_module_get_ctx(module);
@ -2191,6 +2191,11 @@ static int replmd_modify_la_delete(struct ldb_module *module,
return LDB_ERR_NO_SUCH_ATTRIBUTE;
}
tmp_ctx = talloc_new(msg);
if (tmp_ctx == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
ret = get_parsed_dns(module, tmp_ctx, el, &dns, schema_attr->syntax->ldap_oid, parent);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);