aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorLarry Stefani <larry.stefani@sonos.com>2017-04-13 10:10:42 -0400
committerDaniel Stenberg <daniel@haxx.se>2017-04-15 23:29:25 +0200
commitfc347820a27c5e5ed1ccfe1c81c4c4eb2a59f9fe (patch)
tree268379ece3df1037652bd3d7abe0c7947dd8d286 /lib/vtls
parent9168e2470d5203661faa5500361b7eb493aa24dd (diff)
mbedtls: fix memory leak in error path
Add missing our_ssl_sessionid free call in mbed_connect_step3(). Closes #1417
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/mbedtls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index 7cd2d6d0f..edf30dbd9 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -697,6 +697,7 @@ mbed_connect_step3(struct connectdata *conn,
ret = mbedtls_ssl_get_session(&connssl->ssl, our_ssl_sessionid);
if(ret) {
+ free(our_ssl_sessionid);
failf(data, "mbedtls_ssl_get_session returned -0x%x", -ret);
return CURLE_SSL_CONNECT_ERROR;
}