mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
adopt: coverity: move vh deref until after pointless check
This commit is contained in:
parent
3e1a1a443d
commit
f8a21fec22
1 changed files with 3 additions and 1 deletions
|
@ -122,7 +122,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;
|
||||
|
@ -136,6 +136,8 @@ __lws_adopt_descriptor_vhost1(struct lws_vhost *vh, lws_adoption_type type,
|
|||
if (!vh)
|
||||
return NULL;
|
||||
|
||||
context = vh->context;
|
||||
|
||||
lws_context_assert_lock_held(vh->context);
|
||||
|
||||
n = -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue