diff options
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectclass.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c index 44d8889dd5..a3fa39e80a 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass.c @@ -537,6 +537,8 @@ static int objectclass_do_add(struct oc_context *ac) } } + talloc_free(mem_ctx); + /* Retrive the message again so get_last_structural_class works */ objectclass_element = ldb_msg_find_element(msg, "objectClass"); @@ -606,7 +608,6 @@ static int objectclass_do_add(struct oc_context *ac) value = talloc_strdup(msg, objectclass->defaultObjectCategory); } if (value == NULL) { - talloc_free(mem_ctx); return ldb_oom(ldb); } ldb_msg_add_string(msg, "objectCategory", value); @@ -651,11 +652,8 @@ static int objectclass_do_add(struct oc_context *ac) samdb_msg_add_int(ldb, msg, msg, "systemFlags", systemFlags); } } - - talloc_free(mem_ctx); ret = ldb_msg_sanity_check(ldb, msg); - if (ret != LDB_SUCCESS) { return ret; } |