mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +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
57c5a0da55
commit
39380ffbac
1 changed files with 4 additions and 0 deletions
|
@ -451,6 +451,10 @@ lws_client_connect_via_info(const struct lws_client_connect_info *i)
|
||||||
if (i->pwsi)
|
if (i->pwsi)
|
||||||
*i->pwsi = wsi;
|
*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 */
|
/* PHASE 8: notify protocol with role-specific connected callback */
|
||||||
|
|
||||||
/* raw socket per se doesn't want this... raw socket proxy wants it... */
|
/* raw socket per se doesn't want this... raw socket proxy wants it... */
|
||||||
|
|
Loading…
Add table
Reference in a new issue