BUG/MINOR: jwt: Missing pkey free during cleanup

When emptying the jwt_cert_tree during deinit, the entries are freed but
not the EVP_PKEY reference they kept, leading in a memory leak.

Should be backported in 2.5.
This commit is contained in:
Remi Tricot-Le Breton 2022-02-04 14:21:02 +01:00 committed by William Lallemand
parent 4930c6c869
commit 2b5a655946

View File

@ -364,6 +364,7 @@ static void jwt_deinit(void)
while (node) {
entry = ebmb_entry(node, struct jwt_cert_tree_entry, node);
ebmb_delete(node);
EVP_PKEY_free(entry->pkey);
ha_free(&entry);
node = ebmb_first(&jwt_cert_tree);
}