diff options
author | Michael Adam <obnox@samba.org> | 2008-03-17 01:02:47 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-17 08:22:33 +0100 |
commit | a0d4c1e127e1d2b57b0d823dec5e0cf710aef0ce (patch) | |
tree | f653750248654d850f44cb7c238d9a6463ff5ff1 /source3/registry | |
parent | 78adf71669ab450c6198b7342c13909c54056312 (diff) | |
download | samba-a0d4c1e127e1d2b57b0d823dec5e0cf710aef0ce.tar.gz samba-a0d4c1e127e1d2b57b0d823dec5e0cf710aef0ce.tar.bz2 samba-a0d4c1e127e1d2b57b0d823dec5e0cf710aef0ce.zip |
registry: allocate tempory data in talloc stack in regdb_store_keys().
Michael
(This used to be commit a99b51159a7db5f249ff136cf9ba758d14380a35)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_backend_db.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 8bfa3526ea..8a859301f0 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -467,7 +467,7 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) * changed */ - if (!(old_subkeys = TALLOC_ZERO_P(ctr, REGSUBKEY_CTR))) { + if (!(old_subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR))) { DEBUG(0,("regdb_store_keys: talloc() failure!\n")); return false; } @@ -504,7 +504,7 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) * Re-fetch the old keys inside the transaction */ - if (!(old_subkeys = TALLOC_ZERO_P(ctr, REGSUBKEY_CTR))) { + if (!(old_subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR))) { DEBUG(0,("regdb_store_keys: talloc() failure!\n")); goto cancel; } @@ -574,7 +574,7 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) num_subkeys = regsubkey_ctr_numkeys(ctr); if (num_subkeys == 0) { - if (!(subkeys = TALLOC_ZERO_P(ctr, REGSUBKEY_CTR)) ) { + if (!(subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR)) ) { DEBUG(0,("regdb_store_keys: talloc() failure!\n")); goto cancel; } @@ -595,7 +595,7 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) if (!path) { goto cancel; } - if (!(subkeys = TALLOC_ZERO_P(ctr, REGSUBKEY_CTR)) ) { + if (!(subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR)) ) { DEBUG(0,("regdb_store_keys: talloc() failure!\n")); goto cancel; } @@ -626,8 +626,6 @@ cancel: } fail: - TALLOC_FREE(old_subkeys); - TALLOC_FREE(subkeys); TALLOC_FREE(ctx); return false; |