diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-12-03 16:51:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:21 -0500 |
commit | b0a6049391d4aebcaa6e0370deb20651a07dcbe8 (patch) | |
tree | 7c01b88d66124c40bb1eeb70b14455e97811c51f /source3/registry | |
parent | b67609792783416e0b89fb31f441bf17828aa5d8 (diff) | |
download | samba-b0a6049391d4aebcaa6e0370deb20651a07dcbe8.tar.gz samba-b0a6049391d4aebcaa6e0370deb20651a07dcbe8.tar.bz2 samba-b0a6049391d4aebcaa6e0370deb20651a07dcbe8.zip |
r20018: Fix a memleak in reg_createkey
(This used to be commit 281640823bfe25f513f44f6c6d7022a11b957fa5)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 907d0236c7..7abf0538f8 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -334,8 +334,10 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent, err = reg_openkey(ctx, key, path, desired_access, pkey); if (W_ERROR_IS_OK(err)) { - *paction = REG_OPENED_EXISTING_KEY; - return WERR_OK; + if (paction != NULL) { + *paction = REG_OPENED_EXISTING_KEY; + } + goto done; } if (!W_ERROR_EQUAL(err, WERR_BADFILE)) { |