b153b32a0bb81b5d50f098aa19e88efbf2248216
[packages.git] / net / haproxy / patches / 0004-BUG-MINOR-deinit-free-fdinfo-while-doing-cleanup.patch
1 From 25d0a14ada411dc73b55b55d5b27599ccd2fa4a2 Mon Sep 17 00:00:00 2001
2 From: Godbach <nylzhaowei@gmail.com>
3 Date: Wed, 26 Jun 2013 16:49:51 +0800
4 Subject: [PATCH 4/9] BUG/MINOR: deinit: free fdinfo while doing cleanup
5
6 Both fdinfo and fdtab are allocated memory in init() while haproxy is starting,
7 but only fdtab is freed in deinit(), fdinfo should also be freed.
8
9 Signed-off-by: Godbach <nylzhaowei@gmail.com>
10 (cherry picked from commit 4cc1b0d4ef283b5ace5249483ec7eb3b1fc5d193)
11 ---
12  src/haproxy.c | 1 +
13  1 file changed, 1 insertion(+)
14
15 diff --git a/src/haproxy.c b/src/haproxy.c
16 index 7a09e3f..c163743 100644
17 --- a/src/haproxy.c
18 +++ b/src/haproxy.c
19 @@ -941,6 +941,7 @@ void deinit(void)
20         free(global.pidfile); global.pidfile = NULL;
21         free(global.node);    global.node = NULL;
22         free(global.desc);    global.desc = NULL;
23 +       free(fdinfo);         fdinfo  = NULL;
24         free(fdtab);          fdtab   = NULL;
25         free(oldpids);        oldpids = NULL;
26  
27 -- 
28 1.8.1.5
29