mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
Coverity 189185: access_log: guarantee no null wsi vhost
This commit is contained in:
parent
ece243f961
commit
43f9a8de80
1 changed files with 4 additions and 1 deletions
|
@ -51,8 +51,11 @@ lws_prepare_access_log_info(struct lws *wsi, char *uri_ptr, int meth)
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
int l = 256, m;
|
int l = 256, m;
|
||||||
|
|
||||||
|
if (!wsi->vhost)
|
||||||
|
return;
|
||||||
|
|
||||||
/* only worry about preparing it if we store it */
|
/* only worry about preparing it if we store it */
|
||||||
if (wsi->vhost && wsi->vhost->log_fd == (int)LWS_INVALID_FILE)
|
if (wsi->vhost->log_fd == (int)LWS_INVALID_FILE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (wsi->access_log_pending)
|
if (wsi->access_log_pending)
|
||||||
|
|
Loading…
Add table
Reference in a new issue