mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
registry: don't leak (to talloc_tos()) in regdb_store_keys_internal().
Michael
This commit is contained in:
parent
f357b1ddd3
commit
76e4cdc25f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user