From: Godbach Date: Wed, 2 Oct 2013 09:10:11 +0000 (+0800) Subject: BUG/MINOR: deinit: free server map which is allocated in init_server_map() X-Git-Tag: v1.5-dev20~270 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af1a75d2c992411b947d1c0ebc2a1d7f1454ed04;p=thirdparty%2Fhaproxy.git BUG/MINOR: deinit: free server map which is allocated in init_server_map() Both static-rr and hash with type map-based call init_server_map() to allocate server map, so the server map should be freed while doing cleanup if one of the above load balance algorithms is used. Signed-off-by: Godbach [wt: removed the unneeded "if" before the free] --- diff --git a/src/haproxy.c b/src/haproxy.c index ec9f513627..bc03a73b8e 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -975,6 +975,7 @@ void deinit(void) free(p->conf.lfs_file); free(p->conf.uniqueid_format_string); free(p->conf.uif_file); + free(p->lbprm.map.srv); for (i = 0; i < HTTP_ERR_SIZE; i++) chunk_destroy(&p->errmsg[i]);