From: Aki Tuomi Date: Mon, 19 Dec 2016 10:16:20 +0000 (+0200) Subject: lib-index: Make sure buffer is not null before freeing X-Git-Tag: 2.3.0.rc1~2389 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=261c0ffe765bcd5c654f7c85f5874baea870a8a5;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Make sure buffer is not null before freeing Fixes signal 11 crash under stress. --- diff --git a/src/lib-index/mail-transaction-log-file.c b/src/lib-index/mail-transaction-log-file.c index a5da3966fb..5cc9f60208 100644 --- a/src/lib-index/mail-transaction-log-file.c +++ b/src/lib-index/mail-transaction-log-file.c @@ -950,7 +950,8 @@ int mail_transaction_log_file_open(struct mail_transaction_log_file *file, } /* ESTALE - try again */ - buffer_free(&file->buffer); + if (file->buffer != NULL) + buffer_free(&file->buffer); } mail_transaction_log_file_add_to_list(file);