mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-17 20:24:24 +00:00
altcp_tls: fix pbuf leaked when handshake failed
Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
30ddfe1a98
commit
c7106cc57f
@ -894,6 +894,11 @@ altcp_mbedtls_close(struct altcp_pcb *conn)
|
||||
}
|
||||
state = (altcp_mbedtls_state_t *)conn->state;
|
||||
if (state != NULL) {
|
||||
if (state->rx) {
|
||||
/* free leftover (unhandled) rx pbufs */
|
||||
pbuf_free(state->rx);
|
||||
state->rx = NULL;
|
||||
}
|
||||
state->flags |= ALTCP_MBEDTLS_FLAGS_TX_CLOSED;
|
||||
if (state->flags & ALTCP_MBEDTLS_FLAGS_RX_CLOSED) {
|
||||
altcp_mbedtls_dealloc(conn);
|
||||
|
Loading…
Reference in New Issue
Block a user