components/openssl: free peer cert X509 object when SSL_free

This commit is contained in:
dongheng 2016-09-23 13:38:11 +08:00
parent e475d0539e
commit db9becfa74

View file

@ -149,6 +149,9 @@ void ssl_pm_free(SSL *ssl)
mbedtls_ssl_config_free(&ssl_pm->conf);
mbedtls_ssl_free(&ssl_pm->ssl);
ssl_free(ssl->session.peer);
ssl->session.peer = NULL;
ssl_free(ssl_pm);
ssl->ssl_pm = NULL;
}