Hi Willy,

There is a patch for freeing server map while doing cleanup.

Please check the attatchment for your information.

The commit log is as below:
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.

-- 
Best Regards,
Godbach

From 9366d553d9415c3d3d7f6889903eca2e7382f597 Mon Sep 17 00:00:00 2001
From: Godbach <[email protected]>
Date: Wed, 2 Oct 2013 17:10:11 +0800
Subject: [PATCH] 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 <[email protected]>
---
 src/haproxy.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/haproxy.c b/src/haproxy.c
index ec9f513..265c39c 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -975,6 +975,8 @@ void deinit(void)
                free(p->conf.lfs_file);
                free(p->conf.uniqueid_format_string);
                free(p->conf.uif_file);
+               if (p->lbprm.map.srv)
+                       free(p->lbprm.map.srv);
 
                for (i = 0; i < HTTP_ERR_SIZE; i++)
                        chunk_destroy(&p->errmsg[i]);
-- 
1.7.7

Reply via email to