ldb_del_value: Free key data also when removing the default attribute
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 12 Sep 2008 14:31:57 +0000 (16:31 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 21 Oct 2008 12:40:40 +0000 (14:40 +0200)
source4/lib/registry/ldb.c

index 2eb4e9e3ce475d032c56ae21430336826301936c..e4037b1d90c2484e0d79d0eb7ad39e67496f736e 100644 (file)
@@ -545,12 +545,12 @@ static WERROR ldb_del_value (struct hive_key *key, const char *child)
                        DEBUG(1, ("ldb_del_value: %s\n", ldb_errstring(kd->ldb)));
                        return WERR_FOOBAR;
                }
-
-               /* reset cache */
-               talloc_free(kd->values);
-               kd->values = NULL;
        }
 
+       /* reset cache */
+       talloc_free(kd->values);
+       kd->values = NULL;
+
        return WERR_OK;
 }