Skip to content

Commit

Permalink
lib-index: Make sure buffer is not null before freeing
Browse files Browse the repository at this point in the history
Fixes signal 11 crash under stress.
  • Loading branch information
cmouse authored and sirainen committed Dec 20, 2016
1 parent 88f7ecd commit eb0308e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-index/mail-transaction-log-file.c
Expand Up @@ -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);
Expand Down

0 comments on commit eb0308e

Please sign in to comment.