diff options
author | Michael Adam <obnox@samba.org> | 2008-03-17 00:09:07 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-17 08:22:32 +0100 |
commit | a446378e7aa45af797901687ca10b81da1f1b5f3 (patch) | |
tree | 1ffb15ddc086acbb1d6476811b9bbb1e13d38522 | |
parent | 8432f7f8cf2ec6aa35f4fa40c824f46c0f255228 (diff) | |
download | samba-a446378e7aa45af797901687ca10b81da1f1b5f3.tar.gz samba-a446378e7aa45af797901687ca10b81da1f1b5f3.tar.bz2 samba-a446378e7aa45af797901687ca10b81da1f1b5f3.zip |
registry: don't leak (to talloc_tos()) in regdb_store_keys_internal().
Michael
(This used to be commit 76e4cdc25fc9a7e47fd9a356dc54533b62c5db08)
-rw-r--r-- | source3/registry/reg_backend_db.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 59b5bad6ae..0ef76fe82f 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -386,7 +386,7 @@ static bool regdb_store_keys_internal(const char *key, REGSUBKEY_CTR *ctr) bool ret = true; uint32 num_subkeys = regsubkey_ctr_numkeys(ctr); char *keyname = NULL; - TALLOC_CTX *ctx = talloc_tos(); + TALLOC_CTX *ctx = talloc_stackframe(); NTSTATUS status; if (!key) { @@ -439,6 +439,7 @@ static bool regdb_store_keys_internal(const char *key, REGSUBKEY_CTR *ctr) } done: + TALLOC_FREE(ctx); SAFE_FREE( buffer ); return ret; } |