mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
client: connect: confirm we have a protocol
Coverity gets antsy that we were checking wsi->a.protocol for NULL earlier then start using it... explicitly bail if it's NULL before we start using it.
This commit is contained in:
parent
f3a1263bc1
commit
d3783f0c71
1 changed files with 4 additions and 0 deletions
|
@ -450,6 +450,10 @@ lws_client_connect_via_info(const struct lws_client_connect_info *i)
|
|||
if (i->pwsi)
|
||||
*i->pwsi = wsi;
|
||||
|
||||
if (!wsi->a.protocol)
|
||||
/* we must have one protocol or another bound by this point */
|
||||
goto bail;
|
||||
|
||||
/* PHASE 8: notify protocol with role-specific connected callback */
|
||||
|
||||
/* raw socket per se doesn't want this... raw socket proxy wants it... */
|
||||
|
|
Loading…
Add table
Reference in a new issue