1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

coverity: 10600: make sure vhosts get off the pending destruction list if on it

This commit is contained in:
Andy Green 2020-08-19 06:52:47 +01:00
parent a8315807e7
commit 944ef24e67

View file

@ -1146,8 +1146,10 @@ __lws_vhost_destroy2(struct lws_vhost *vh)
/* add ourselves to the pending destruction list */
vh->vhost_next = vh->context->vhost_pending_destruction_list;
vh->context->vhost_pending_destruction_list = vh;
if (vh->context->vhost_pending_destruction_list != vh) {
vh->vhost_next = vh->context->vhost_pending_destruction_list;
vh->context->vhost_pending_destruction_list = vh;
}
lwsl_info("%s: %p\n", __func__, vh);