bufferevent_ssl: fix freeing ctx in case of error in bufferevent_ssl_new_impl

This commit is contained in:
Azat Khuzhin 2024-02-18 19:40:00 +01:00
parent c9793baa87
commit 5412b2c30d

View File

@ -1088,8 +1088,8 @@ err:
bev_ssl->ssl = NULL;
bufferevent_free(&bev_ssl->bev.bev);
} else {
if (ssl && (options & BEV_OPT_CLOSE_ON_FREE))
bev_ssl->ssl_ops->free_raw(bev_ssl->ssl);
if (ssl && options & BEV_OPT_CLOSE_ON_FREE)
ssl_ops->free_raw(ssl);
}
return NULL;
}