projects
/
libeap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e06e9d
)
Fix memory leak on TLS setup error path
author
Jouni Malinen
<j@w1.fi>
Sat, 13 Feb 2010 08:19:41 +0000
(10:19 +0200)
committer
Jouni Malinen
<j@w1.fi>
Sat, 13 Feb 2010 08:19:41 +0000
(10:19 +0200)
Need tof free TLS context in some cases to avoid a memory leak
on error path.
src/eap_peer/eap_tls_common.c
patch
|
blob
|
history
diff --git
a/src/eap_peer/eap_tls_common.c
b/src/eap_peer/eap_tls_common.c
index
49f61b3
..
7bd50f6
100644
(file)
--- a/
src/eap_peer/eap_tls_common.c
+++ b/
src/eap_peer/eap_tls_common.c
@@
-169,10
+169,14
@@
static int eap_tls_init_connection(struct eap_sm *sm,
config->pin = NULL;
eap_sm_request_pin(sm);
sm->ignore = TRUE;
+ tls_connection_deinit(sm->ssl_ctx, data->conn);
+ data->conn = NULL;
return -1;
} else if (res) {
wpa_printf(MSG_INFO, "TLS: Failed to set TLS connection "
"parameters");
+ tls_connection_deinit(sm->ssl_ctx, data->conn);
+ data->conn = NULL;
return -1;
}