From 98532b0f1386bcabd8940d0cfd339f76b3341ea8 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 9 Jan 2014 22:18:40 +0100 Subject: idevice: don't free ssl bio after SSL_set_bio has been called --- src/idevice.c | 2 -- src/idevice.h | 1 - 2 files changed, 3 deletions(-) (limited to 'src') diff --git a/src/idevice.c b/src/idevice.c index 428f359..26f8ae7 100644 --- a/src/idevice.c +++ b/src/idevice.c @@ -738,13 +738,11 @@ 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))); - BIO_free(ssl_bio); SSL_CTX_free(ssl_ctx); } else { ssl_data_t ssl_data_loc = (ssl_data_t)malloc(sizeof(struct ssl_data_private)); ssl_data_loc->session = ssl; ssl_data_loc->ctx = ssl_ctx; - ssl_data_loc->bio = ssl_bio; connection->ssl_data = ssl_data_loc; ret = IDEVICE_E_SUCCESS; debug_info("SSL mode enabled, cipher: %s", SSL_get_cipher(ssl)); diff --git a/src/idevice.h b/src/idevice.h index 01b13df..13616ef 100644 --- a/src/idevice.h +++ b/src/idevice.h @@ -45,7 +45,6 @@ struct ssl_data_private { #ifdef HAVE_OPENSSL SSL *session; SSL_CTX *ctx; - BIO *bio; #else gnutls_certificate_credentials_t certificate; gnutls_session_t session; -- cgit v1.1-32-gdbae