Remove redundant null check before delete

Reported in https://github.com/nghttp2/nghttp2/issues/1384
This commit is contained in:
Tatsuhiro Tsujikawa 2019-08-19 22:27:32 +09:00
parent 95efb3e19d
commit f2fde180cd
1 changed files with 1 additions and 3 deletions

View File

@ -159,9 +159,7 @@ ConnectionHandler::~ConnectionHandler() {
for (auto ssl_ctx : all_ssl_ctx_) { for (auto ssl_ctx : all_ssl_ctx_) {
auto tls_ctx_data = auto tls_ctx_data =
static_cast<tls::TLSContextData *>(SSL_CTX_get_app_data(ssl_ctx)); static_cast<tls::TLSContextData *>(SSL_CTX_get_app_data(ssl_ctx));
if (tls_ctx_data) { delete tls_ctx_data;
delete tls_ctx_data;
}
SSL_CTX_free(ssl_ctx); SSL_CTX_free(ssl_ctx);
} }