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

coverity: 62131: check when logging role name for NULL

This commit is contained in:
Andy Green 2020-08-18 09:38:00 +01:00
parent 06005d14b4
commit b63c7f1e8e

View file

@ -1920,7 +1920,8 @@ lws_http_to_fallback(struct lws *wsi, unsigned char *obuf, size_t olen)
lwsl_notice("%s: vh %s, peer: %s, role %s, "
"protocol %s, cb %d, ah %p\n", __func__, wsi->a.vhost->name,
ipbuf, role->name, protocol->name, n, wsi->http.ah);
ipbuf, role ? role->name : "null", protocol->name, n,
wsi->http.ah);
if ((wsi->a.protocol->callback)(wsi, n, wsi->user_space, NULL, 0))
return 1;