summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/idevice.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/idevice.c b/src/idevice.c
index 26f8ae7..5fa2e85 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -738,6 +738,7 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection)
return_me = SSL_do_handshake(ssl);
if (return_me != 1) {
debug_info("ERROR in SSL_do_handshake: %s", errorstring(SSL_get_error(ssl, return_me)));
+ SSL_free(ssl);
SSL_CTX_free(ssl_ctx);
} else {
ssl_data_t ssl_data_loc = (ssl_data_t)malloc(sizeof(struct ssl_data_private));