mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
Fix a possible double-free bug in SSL bufferevents with CLOSE_ON_FREE
With CLOSE_ON_FREE set, we were telling the BIO to free the bufferevent when it was closed, and also freeing it ourselves.
This commit is contained in:
parent
0d047c3f11
commit
75018951ec
@ -1207,7 +1207,9 @@ bufferevent_openssl_filter_new(struct event_base *base,
|
||||
enum bufferevent_ssl_state state,
|
||||
int options)
|
||||
{
|
||||
int close_flag = options & BEV_OPT_CLOSE_ON_FREE;
|
||||
/* We don't tell the BIO to close the bufferevent; we do it ourselves
|
||||
* on be_openssl_destruct */
|
||||
int close_flag = 0; /* options & BEV_OPT_CLOSE_ON_FREE; */
|
||||
BIO *bio;
|
||||
if (!underlying)
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user