s3:registry: fix possible double free in import
authorGregor Beck <gbeck@sernet.de>
Mon, 7 May 2012 13:44:21 +0000 (15:44 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 26 Jun 2012 17:57:18 +0000 (19:57 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
source3/registry/reg_import.c

index ce3cd9729fdb6f845b2326a9d0f64a281041a56f..5f99b07329e07005a94fa19da366d62897b41bbd 100644 (file)
@@ -75,6 +75,7 @@ int reg_parse_callback_key(struct reg_import* p,
 
        if (p->open_key != NULL ) {
                werr = p->call.closekey(p->call.data, p->open_key);
+               p->open_key = NULL;
                if (!W_ERROR_IS_OK(werr)) {
                        DEBUG(0, ("closekey failed: %s\n", win_errstr(werr)));
                }