aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tlsv1_client.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-13 18:57:32 (GMT)
committerJouni Malinen <j@w1.fi>2011-11-13 18:57:32 (GMT)
commit94a9ebb0b2c53260fef5c21cd0d430c1d7552232 (patch)
treec13ea40f5331e98e25cb2e08b42f7cf7e740211c /src/tls/tlsv1_client.c
parentc660b0c25794a91f41b11c8f7cf97afabde3ae08 (diff)
downloadhostap-94a9ebb0b2c53260fef5c21cd0d430c1d7552232.zip
hostap-94a9ebb0b2c53260fef5c21cd0d430c1d7552232.tar.gz
hostap-94a9ebb0b2c53260fef5c21cd0d430c1d7552232.tar.bz2
TLS: Fix double-free on error path
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/tls/tlsv1_client.c')
-rw-r--r--src/tls/tlsv1_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tls/tlsv1_client.c b/src/tls/tlsv1_client.c
index a333fef..a94ca5f 100644
--- a/src/tls/tlsv1_client.c
+++ b/src/tls/tlsv1_client.c
@@ -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;