s3:registry: don't leak the old contents when updating the value cache
authorMichael Adam <obnox@samba.org>
Thu, 12 Apr 2012 06:18:04 +0000 (08:18 +0200)
committerAndreas Schneider <asn@samba.org>
Wed, 25 Apr 2012 12:31:09 +0000 (14:31 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
source3/registry/reg_api.c

index d1b43ba3e8909e09cd36b4d4c6bb285690083dc3..712cbda78883d60bdd138737aaf28be996572c01 100644 (file)
@@ -89,6 +89,7 @@ static WERROR fill_value_cache(struct registry_key *key)
                }
        }
 
+       TALLOC_FREE(key->values);
        werr = regval_ctr_init(key, &(key->values));
        W_ERROR_NOT_OK_RETURN(werr);