From: Andrew Bartlett Date: Thu, 16 May 2019 04:15:39 +0000 (+1200) Subject: dsdb/partition: Remove teardown of data->metadata on partition_metadata_set_sequence_... X-Git-Tag: ldb-2.0.5~759 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=99867565a5070c072abcf7abc69bba9849b4984a;p=thirdparty%2Fsamba.git dsdb/partition: Remove teardown of data->metadata on partition_metadata_set_sequence_number() failure This changes variables that are not the responsiblity of this function, the unlock implied by partition_del_trans() needs to be done carefully in the right spot. Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/source4/dsdb/samdb/ldb_modules/partition_metadata.c b/source4/dsdb/samdb/ldb_modules/partition_metadata.c index c0800f5e506..02e56e175a3 100644 --- a/source4/dsdb/samdb/ldb_modules/partition_metadata.c +++ b/source4/dsdb/samdb/ldb_modules/partition_metadata.c @@ -406,8 +406,6 @@ int partition_metadata_sequence_number_increment(struct ldb_module *module, uint */ ret = partition_metadata_set_sequence_number(module); if (ret != LDB_SUCCESS) { - TALLOC_FREE(data->metadata); - partition_del_trans(module); return ret; }