mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
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.
This commit is contained in:
parent
a53eb4d4fe
commit
f8d74d058e
1 changed files with 6 additions and 1 deletions
|
@ -120,7 +120,7 @@ __lws_adopt_descriptor_vhost1(struct lws_vhost *vh, lws_adoption_type type,
|
|||
const char *vh_prot_name, struct lws *parent,
|
||||
void *opaque, const char *fi_wsi_name)
|
||||
{
|
||||
struct lws_context *context = vh->context;
|
||||
struct lws_context *context;
|
||||
struct lws_context_per_thread *pt;
|
||||
struct lws *new_wsi;
|
||||
int n;
|
||||
|
@ -131,6 +131,11 @@ __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;
|
||||
|
||||
context = vh->context;
|
||||
|
||||
lws_context_assert_lock_held(vh->context);
|
||||
|
||||
n = -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue