Hi Willy,

On 2013-10-6 19:32, Willy Tarreau wrote:
Hi Godbach,


OK. Just for your info, the "if" before the free() is not needed
because free() already does it, so I'll remove it.

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
Thanks,
Willy


Yes, I have checked the manual of free(), it said that "If ptr is NULL, no operation is performed."
Please remove it directly.

--
Best Regards,
Godbach


Reply via email to