From: Michael Adam Date: Sun, 13 Apr 2008 13:45:33 +0000 (+0200) Subject: registry: honour the WERROR that regsubkey_ctr_addkey gives us in reg_load_tree. X-Git-Tag: samba-3.3.0pre1~2695 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c2d9baa29edb2356f32ca19aea828184e9ac7b93;p=thirdparty%2Fsamba.git registry: honour the WERROR that regsubkey_ctr_addkey gives us in reg_load_tree. Michael --- diff --git a/source/registry/reg_api.c b/source/registry/reg_api.c index cbbc7dd0ef6..e9a71452556 100644 --- a/source/registry/reg_api.c +++ b/source/registry/reg_api.c @@ -771,7 +771,11 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath, key->subkey_index = 0; while ((subkey = regfio_fetch_subkey( regfile, key ))) { - regsubkey_ctr_addkey(subkeys, subkey->keyname); + result = regsubkey_ctr_addkey(subkeys, subkey->keyname); + if (!W_ERROR_IS_OK(result)) { + TALLOC_FREE(subkeys); + return result; + } } /* write this key and values out */