diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_frontend.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 498651894c..90b068dcb9 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -310,8 +310,10 @@ WERROR regkey_open_internal( TALLOC_CTX *mem_ctx, REGISTRY_KEY *parent, return WERR_NOMEM; } - if ( !(W_ERROR_IS_OK(result = regdb_open()) ) ) + if ( !(W_ERROR_IS_OK(result = regdb_open()) ) ) { + TALLOC_FREE(key); return result; + } talloc_set_destructor(key, regkey_destructor); |