diff options
author | Andy Green <andy@warmcat.com> | 2021-11-08 10:00:17 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2021-11-08 11:05:28 +0000 |
commit | 11ba0b713b83621f65ca859d2798d8d603bbb65b (patch) | |
tree | 6b9a6a0be429f7a86aea812b976506c62ed0e38d | |
parent | b0cd8f6703645ac2eafd65e841c5f06458a7c319 (diff) | |
download | libwebsockets-11ba0b713b83621f65ca859d2798d8d603bbb65b.tar.gz |
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.
-rw-r--r-- | lib/core-net/adopt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/core-net/adopt.c b/lib/core-net/adopt.c index 212adc4d..963fd3d2 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; |