Fix message invalid free

This commit is contained in:
Andrew Pamment 2016-08-12 13:59:02 +10:00
parent 3cbfec54b7
commit fe19686448

View File

@ -82,8 +82,10 @@ void free_message_headers(struct msg_headers *msghs) {
if (msghs->msgs[i]->replyid != NULL) {
free(msghs->msgs[i]->replyid);
}
}
free(msghs->msgs);
}
if (msghs->msg_count > 0) {
free(msghs->msgs);
}
free(msghs);
}