Skip to content

Commit

Permalink
global: start relying on fs_iter_deinit(NULL) being a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef 'Jeff' Sipek authored and sirainen committed May 26, 2018
1 parent 0d5ef33 commit 0a4cf11
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib-dict-extra/dict-fs.c
Expand Up @@ -195,10 +195,9 @@ static int fs_dict_iterate_deinit(struct dict_iterate_context *ctx,
struct fs_dict *dict = (struct fs_dict *)ctx->dict;
int ret;

if (iter->fs_iter != NULL) {
if (fs_iter_deinit(&iter->fs_iter) < 0 && iter->error == NULL)
iter->error = i_strdup(fs_last_error(dict->fs));
}
if (fs_iter_deinit(&iter->fs_iter) < 0 && iter->error == NULL)
iter->error = i_strdup(fs_last_error(dict->fs));

ret = iter->error != NULL ? -1 : 0;
*error_r = t_strdup(iter->error);

Expand Down

0 comments on commit 0a4cf11

Please sign in to comment.