mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
[BUG] fix segfault on exit in new appsession code
The new appsession code didn't like it when appsession_hash_destroy() was called with an empty hash table. Simply add the check.
This commit is contained in:
parent
f223cc0b5c
commit
177a16a8d1
@ -92,6 +92,9 @@ void appsession_hash_destroy(struct appsession_hash *hash)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
appsess *item;
|
appsess *item;
|
||||||
|
|
||||||
|
if (!hash->table)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < TABLESIZE; i++) {
|
for (i = 0; i < TABLESIZE; i++) {
|
||||||
while (!LIST_ISEMPTY(&hash->table[i])) {
|
while (!LIST_ISEMPTY(&hash->table[i])) {
|
||||||
item = LIST_ELEM(hash->table[i].n, appsess *,
|
item = LIST_ELEM(hash->table[i].n, appsess *,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user