diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_api.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index cbbc7dd0ef..e9a7145255 100644 --- a/source3/registry/reg_api.c +++ b/source3/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 */ |