Fix potential double free that could happen after connection error.

MFC after:	3 days
This commit is contained in:
Edward Tomasz Napierala 2014-07-28 21:14:41 +00:00
parent eeadf17a21
commit e403cfdc57

View file

@ -664,7 +664,10 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep)
}
if (error != 0) {
icl_pdu_free(request);
/*
* Don't free the PDU; it's pointed to by ic->ic_receive_pdu
* and will get freed in icl_conn_close().
*/
icl_conn_fail(ic);
}