From 11ba0b713b83621f65ca859d2798d8d603bbb65b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 8 Nov 2021 10:00:17 +0000 Subject: [PATCH] adopt: coverity: add pointless vh NULL check The wsi is always created on a valid vhost. Add a needless NULL check on it to satisfy coverity. --- lib/core-net/adopt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core-net/adopt.c b/lib/core-net/adopt.c index 212adc4d9..963fd3d24 100644 --- a/lib/core-net/adopt.c +++ b/lib/core-net/adopt.c @@ -133,6 +133,9 @@ __lws_adopt_descriptor_vhost1(struct lws_vhost *vh, lws_adoption_type type, * we initialize it, it may become "live" concurrently unexpectedly... */ + if (!vh) + return NULL; + lws_context_assert_lock_held(vh->context); n = -1;