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:
parent
93df14454c
commit
f323205c52
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue