]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: deinit: free server map which is allocated in init_server_map()
authorGodbach <nylzhaowei@gmail.com>
Wed, 2 Oct 2013 09:10:11 +0000 (17:10 +0800)
committerWilly Tarreau <w@1wt.eu>
Sun, 6 Oct 2013 11:34:09 +0000 (13:34 +0200)
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 <nylzhaowei@gmail.com>
[wt: removed the unneeded "if" before the free]

src/haproxy.c

index ec9f5136279dab9f30871769c88494a06ba2a859..bc03a73b8e5c0359f7ad00b0c90e1db887319b79 100644 (file)
@@ -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]);