altcp: fix altcp_free

call dealloc function in altcp_free() so it can be propagate it to inner_conn.
This commit is contained in:
David Girault 2017-06-27 13:17:17 +02:00 committed by goldsimon
parent 8b1a4ef711
commit 9d120c59ea

View File

@ -70,6 +70,9 @@ void
altcp_free(struct altcp_pcb *conn) altcp_free(struct altcp_pcb *conn)
{ {
if (conn) { if (conn) {
if (conn->fns && conn->fns->dealloc) {
conn->fns->dealloc(conn);
}
memp_free(MEMP_ALTCP_PCB, conn); memp_free(MEMP_ALTCP_PCB, conn);
} }
} }