From: Willy Tarreau Date: Mon, 15 Oct 2007 18:04:22 +0000 (+0200) Subject: [BUG] fix segfault on exit in new appsession code X-Git-Tag: v1.3.13~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=177a16a8d1b2f146bf1208482fed72c783aa23d6;p=thirdparty%2Fhaproxy.git [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. --- diff --git a/src/sessionhash.c b/src/sessionhash.c index dc328205aa..eb5c213d43 100644 --- a/src/sessionhash.c +++ b/src/sessionhash.c @@ -92,6 +92,9 @@ void appsession_hash_destroy(struct appsession_hash *hash) unsigned int i; appsess *item; + if (!hash->table) + return; + for (i = 0; i < TABLESIZE; i++) { while (!LIST_ISEMPTY(&hash->table[i])) { item = LIST_ELEM(hash->table[i].n, appsess *,