1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

COVA10063: check malloc return

This commit is contained in:
Andy Green 2019-07-13 11:37:46 -07:00
parent 93df14454c
commit f323205c52

View file

@ -192,6 +192,9 @@ lws_callback_vhost_protocols_vhost(struct lws_vhost *vh, int reason, void *in,
int n;
struct lws *wsi = lws_zalloc(sizeof(*wsi), "fake wsi");
if (!wsi)
return 1;
wsi->context = vh->context;
lws_vhost_bind_wsi(vh, wsi);