Skip to content

Commit

Permalink
lib-fs: fs_iter_deinit(NULL) should be 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 fc9a7d9 commit 0d5ef33
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib-fs/fs-api.c
Expand Up @@ -1141,9 +1141,14 @@ fs_iter_init_with_event(struct fs *fs, struct event *event,
int fs_iter_deinit(struct fs_iter **_iter)
{
struct fs_iter *iter = *_iter;
struct event *event = iter->event;
struct event *event;
int ret;

if (iter == NULL)
return 0;

event = iter->event;

*_iter = NULL;
DLLIST_REMOVE(&iter->fs->iters, iter);

Expand Down

0 comments on commit 0d5ef33

Please sign in to comment.