From: Douglas Bagnall Date: Thu, 30 Jun 2016 03:43:33 +0000 (+1200) Subject: replmd_modify_delete: check talloc_new() X-Git-Tag: tdb-1.3.10~389 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d201591e3955afaae38a1bbeb8f6cb3b8ab8c89;p=thirdparty%2Fsamba.git replmd_modify_delete: check talloc_new() Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 3f76908f8e3..d952868917c 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -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);