mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
vhost: handle creation failure without unbalanced call of PROTOCOL_DESTROY
This commit is contained in:
parent
dc15a77dfa
commit
862ab64d62
1 changed files with 1 additions and 1 deletions
|
@ -1493,7 +1493,7 @@ lws_vhost_destroy1(struct lws_vhost *vh)
|
|||
wsi.context = vh->context;
|
||||
wsi.vhost = vh;
|
||||
protocol = vh->protocols;
|
||||
if (protocol) {
|
||||
if (protocol && vh->created_vhost_protocols) {
|
||||
n = 0;
|
||||
while (n < vh->count_protocols) {
|
||||
wsi.protocol = protocol;
|
||||
|
|
Loading…
Add table
Reference in a new issue