BUG/MAJOR: threads/lb: fix missing unlock on consistent hash LB

If no matching node was found, the function was left without unlocking
the tree.
This commit is contained in:
Willy Tarreau 2017-11-05 10:54:50 +01:00
parent 5ec84574c7
commit 1ed90ac377

View File

@ -388,9 +388,11 @@ struct server *chash_get_next_server(struct proxy *p, struct server *srvtoavoid)
node = eb32_first(root); node = eb32_first(root);
p->lbprm.chash.last = node; p->lbprm.chash.last = node;
if (!node) if (!node) {
/* no node is available */ /* no node is available */
return NULL; srv = NULL;
goto out;
}
/* Note: if we came here after a down/up cycle with no last /* Note: if we came here after a down/up cycle with no last
* pointer, and after a redispatch (srvtoavoid is set), we * pointer, and after a redispatch (srvtoavoid is set), we