From 261c0ffe765bcd5c654f7c85f5874baea870a8a5 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 19 Dec 2016 12:16:20 +0200 Subject: [PATCH] lib-index: Make sure buffer is not null before freeing Fixes signal 11 crash under stress. --- src/lib-index/mail-transaction-log-file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.3