mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
bufferevent_ssl: proper NULL checks
This commit is contained in:
parent
6e4ea6c3f1
commit
c9793baa87
@ -1083,7 +1083,7 @@ bufferevent_ssl_new_impl(struct event_base *base,
|
||||
return &bev_ssl->bev.bev;
|
||||
err:
|
||||
if (bev_ssl) {
|
||||
if (bev_ssl->ssl && (options & BEV_OPT_CLOSE_ON_FREE))
|
||||
if (bev_ssl->ssl && bev_ssl->ssl_ops && options & BEV_OPT_CLOSE_ON_FREE)
|
||||
bev_ssl->ssl_ops->free(bev_ssl->ssl, options);
|
||||
bev_ssl->ssl = NULL;
|
||||
bufferevent_free(&bev_ssl->bev.bev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user