dovecot-2.2: lib-fs: Don't crash if istream-fs-file is closed wi...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 8 17:44:31 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/37054c79e04b
changeset: 16951:37054c79e04b
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 08 17:44:25 2013 +0200
description:
lib-fs: Don't crash if istream-fs-file is closed without never being read.
diffstat:
src/lib-fs/istream-fs-file.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 02a746fd9830 -r 37054c79e04b src/lib-fs/istream-fs-file.c
--- a/src/lib-fs/istream-fs-file.c Fri Nov 08 16:40:13 2013 +0100
+++ b/src/lib-fs/istream-fs-file.c Fri Nov 08 17:44:25 2013 +0200
@@ -15,7 +15,8 @@
{
struct fs_file_istream *fstream = (struct fs_file_istream *)stream;
- i_stream_destroy(&fstream->istream.parent);
+ if (fstream->istream.parent != NULL)
+ i_stream_destroy(&fstream->istream.parent);
fs_file_deinit(&fstream->file);
}
More information about the dovecot-cvs
mailing list