This commit is contained in:
Willem Toorop 2017-03-25 21:45:08 +01:00
parent 3eb6ebf5e4
commit 6316c558bc
2 changed files with 6 additions and 5 deletions

View File

@ -693,9 +693,10 @@ _getdns_upstreams_dereference(getdns_upstreams *upstreams)
upstream->finished_dnsreqs = dnsreq->finished_next;
_getdns_context_cancel_request(dnsreq);
}
if (upstream->tls_session != NULL)
SSL_SESSION_free(upstream->tls_session);
if (upstream->tls_obj != NULL) {
if (upstream->tls_session != NULL)
SSL_SESSION_free(upstream->tls_session);
SSL_shutdown(upstream->tls_obj);
SSL_free(upstream->tls_obj);
}

View File

@ -110,9 +110,9 @@ network_req_cleanup(getdns_network_req *net_req)
if (net_req->response && (net_req->response < net_req->wire_data ||
net_req->response > net_req->wire_data+ net_req->wire_data_sz))
GETDNS_FREE(net_req->owner->my_mf, net_req->response);
if (netreq->debug_tls_peer_cert.size &&
netreq->debug_tls_peer_cert.data)
OPENSSL_free(netreq->debug_tls_peer_cert.data);
if (net_req->debug_tls_peer_cert.size &&
net_req->debug_tls_peer_cert.data)
OPENSSL_free(net_req->debug_tls_peer_cert.data);
}
static uint8_t *