Skip to content

Commit

Permalink
lib-fs: fs_file_close(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 7c37bf6 commit b2de303
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib-fs/fs-api.c
Expand Up @@ -307,6 +307,9 @@ void fs_file_deinit(struct fs_file **_file)

void fs_file_close(struct fs_file *file)
{
if (file == NULL)
return;

i_assert(!file->writing_stream);
i_assert(file->output == NULL);

Expand Down

0 comments on commit b2de303

Please sign in to comment.