registry: Don't leave dangling transactions
authorVolker Lendecke <vl@samba.org>
Wed, 8 Oct 2014 13:39:28 +0000 (15:39 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 8 Oct 2014 13:54:04 +0000 (15:54 +0200)
When a createkey fails due to access denied, we need to do a
transaction_cancel. Otherwise the lock on the db will stay around.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/registry/reg_api.c

index 47a717beedc69702ad414a883143a9df326f1b17..d1c70ec497eeea07158138c8cb3375577cc2b714 100644 (file)
@@ -634,7 +634,7 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
                                 key->token))
        {
                err = WERR_ACCESS_DENIED;
-               goto done;
+               goto trans_done;
        }
 
        /*