s4-repl: free the la list on prepare commit failure
authorAndrew Tridgell <tridge@samba.org>
Fri, 25 Sep 2009 22:13:09 +0000 (15:13 -0700)
committerAndrew Tridgell <tridge@samba.org>
Mon, 28 Sep 2009 00:24:04 +0000 (10:24 +1000)
source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index c83fb0f01b9d14342773b93310daa57ab0d16112..df5ae1a1c69f97854a4597cc7069d34f8ed0ba4a 100644 (file)
@@ -2316,6 +2316,9 @@ static int replmd_prepare_commit(struct ldb_module *module)
                DLIST_REMOVE(replmd_private->la_list, la);
                ret = replmd_process_linked_attribute(module, la);
                if (ret != LDB_SUCCESS) {
+                       talloc_free(replmd_private->la_ctx);
+                       replmd_private->la_list = NULL;
+                       replmd_private->la_ctx = NULL;
                        return ret;
                }
        }