summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-29 12:39:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:15 -0500
commit4a42371c20dfeb8ad1054a944d7e31c2d32192a5 (patch)
tree3b76971a166e70910adce04af74cfaeaf488ceba
parent1c91cca86eacc74c2785c54bc75c5ff18d7a773d (diff)
downloadsamba-4a42371c20dfeb8ad1054a944d7e31c2d32192a5.tar.gz
samba-4a42371c20dfeb8ad1054a944d7e31c2d32192a5.tar.bz2
samba-4a42371c20dfeb8ad1054a944d7e31c2d32192a5.zip
r19948: Fix a memleak
(This used to be commit fd429c8c06e01452f04700518c93ecfaa51c3140)
-rw-r--r--source3/registry/reg_frontend.c4
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);