]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
repl_meta_data: free context on error in replmd_modify_la_delete()
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 5 Jul 2016 23:53:19 +0000 (11:53 +1200)
committerGarming Sam <garming@samba.org>
Fri, 15 Jul 2016 08:01:28 +0000 (10:01 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index d952868917cec9291f78910a88be097392f796fa..efd1932a9ec23d6cc7e21e014e8c41d4503d4d6c 100644 (file)
@@ -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;
                        }
                }