]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: fs_file_close(NULL) should be a no-op
authorJosef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
Fri, 25 May 2018 14:35:35 +0000 (10:35 -0400)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 26 May 2018 09:39:55 +0000 (09:39 +0000)
src/lib-fs/fs-api.c

index 8d92994f31a485b5a694e69e1eb0067b689347ba..9f79d4afef1426bf4678b715bd7a383dfa81cf51 100644 (file)
@@ -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);