mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
TLS: Fix double-free on error path
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
c660b0c257
commit
94a9ebb0b2
@ -196,7 +196,6 @@ u8 * tlsv1_client_handshake(struct tlsv1_client *conn,
|
||||
if (used == 0) {
|
||||
struct wpabuf *partial;
|
||||
wpa_printf(MSG_DEBUG, "TLSv1: Need more data");
|
||||
os_free(in_msg);
|
||||
partial = wpabuf_alloc_copy(pos, end - pos);
|
||||
wpabuf_free(conn->partial_input);
|
||||
conn->partial_input = partial;
|
||||
@ -208,6 +207,7 @@ u8 * tlsv1_client_handshake(struct tlsv1_client *conn,
|
||||
TLS_ALERT_INTERNAL_ERROR);
|
||||
goto failed;
|
||||
}
|
||||
os_free(in_msg);
|
||||
if (need_more_data)
|
||||
*need_more_data = 1;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user