ws: fix potential NULL pointer dereference

This commit is contained in:
icy17 2024-08-12 10:00:44 +02:00 committed by Azat Khuzhin
parent d1a90d09dc
commit 628f39bb90

3
ws.c
View File

@ -416,6 +416,9 @@ evws_new_session(
evws->http_server = evcon->http_server;
evws->bufev = evhttp_start_ws_(req);
if (evws->bufev == NULL) {
goto error;
}
if (options & BEV_OPT_THREADSAFE) {
if (bufferevent_enable_locking_(evws->bufev, NULL) < 0)