From 4a42371c20dfeb8ad1054a944d7e31c2d32192a5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 29 Nov 2006 12:39:33 +0000 Subject: r19948: Fix a memleak (This used to be commit fd429c8c06e01452f04700518c93ecfaa51c3140) --- source3/registry/reg_frontend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit