summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/registry/reg_backend_db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 13458fe459..787ca76f89 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -493,6 +493,8 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
}
}
+ TALLOC_FREE(old_subkeys);
+
if (regdb->transaction_start(regdb) == -1) {
DEBUG(0, ("regdb_store_keys: transaction_start failed\n"));
return false;
@@ -502,8 +504,6 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
* Re-fetch the old keys inside the transaction
*/
- TALLOC_FREE(old_subkeys);
-
if (!(old_subkeys = TALLOC_ZERO_P(ctr, REGSUBKEY_CTR))) {
DEBUG(0,("regdb_store_keys: talloc() failure!\n"));
goto fail;