mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: COV294450 and COV294451
This commit is contained in:
parent
625bade63e
commit
80ecbb754d
2 changed files with 11 additions and 1 deletions
|
@ -89,7 +89,12 @@ lws_client_connect_via_info(const struct lws_client_connect_info *i)
|
|||
wsi->a.vhost = NULL;
|
||||
if (!i->vhost) {
|
||||
struct lws_vhost *v = i->context->vhost_list;
|
||||
if (v && !strcmp(v->name, "system"))
|
||||
|
||||
if (!v) { /* coverity */
|
||||
lwsl_err("%s: no vhost\n", __func__);
|
||||
goto bail;
|
||||
}
|
||||
if (!strcmp(v->name, "system"))
|
||||
v = v->vhost_next;
|
||||
lws_vhost_bind_wsi(v, wsi);
|
||||
} else
|
||||
|
|
|
@ -298,6 +298,11 @@ lws_async_dns_init(struct lws_context *context)
|
|||
char ads[48];
|
||||
int n;
|
||||
|
||||
if (!context->vhost_list) { /* coverity... system vhost always present */
|
||||
lwsl_err("%s: no system vhost\n", __func__);
|
||||
return 1;
|
||||
}
|
||||
|
||||
memset(&dns->sa46, 0, sizeof(dns->sa46));
|
||||
|
||||
#if defined(LWS_WITH_SYS_DHCP_CLIENT)
|
||||
|
|
Loading…
Add table
Reference in a new issue