Skip to content

Commit

Permalink
lib-fs: fs_file_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 c2357a9 commit f3e3f1f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib-fs/fs-api.c
Expand Up @@ -279,8 +279,14 @@ struct fs_file *fs_file_init_with_event(struct fs *fs, struct event *event,
void fs_file_deinit(struct fs_file **_file)
{
struct fs_file *file = *_file;
struct event *event = file->event;
pool_t metadata_pool = file->metadata_pool;
struct event *event;
pool_t metadata_pool;

if (file == NULL)
return;

event = file->event;
metadata_pool = file->metadata_pool;

i_assert(file->fs->files_open_count > 0);

Expand Down

0 comments on commit f3e3f1f

Please sign in to comment.