mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MINOR: jwt: Double free in deinit function
The node pointer was not moving properly along the jwt_cert_tree during the deinit which ended in a double free during cleanup (or when checking a configuration that used the jwt_verify converter with an explicit certificate specified). This patch fixes GitHub issue #1533. It should be backported to 2.5.
This commit is contained in:
parent
31e4f6e149
commit
4930c6c869
@ -363,6 +363,7 @@ static void jwt_deinit(void)
|
|||||||
node = ebmb_first(&jwt_cert_tree);
|
node = ebmb_first(&jwt_cert_tree);
|
||||||
while (node) {
|
while (node) {
|
||||||
entry = ebmb_entry(node, struct jwt_cert_tree_entry, node);
|
entry = ebmb_entry(node, struct jwt_cert_tree_entry, node);
|
||||||
|
ebmb_delete(node);
|
||||||
ha_free(&entry);
|
ha_free(&entry);
|
||||||
node = ebmb_first(&jwt_cert_tree);
|
node = ebmb_first(&jwt_cert_tree);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user