BUG/MINOR: server: add missing free for server->rdr_pfx
rdr_pfx was not being free during server cleanup, leading to small memory
leak when "redir" argument was used on a server line (HTTP only).
This should be backported to every stable versions.
[For 2.6 and 2.7: the free should be performed in srv_drop() directly.
For older versions: free in deinit() function near the free for the
cookie string]
(cherry picked from commit 2c9bd3ae808872e52c07d7ec1d62f734dcbb6776)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit d2d7fbd1ef16beb525b7b869d48b1519dbe7f4cc)
[cf: free performed in srv_drop() as expected]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 16fe0670060c4aaa26a0961e5fafa4d71fab87cc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 6647a2439ba0e88aac2b1bfd313143e68c3b463a)
[cf: applied in free_server()]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/server.c b/src/server.c
index fe82679..4979908 100644
--- a/src/server.c
+++ b/src/server.c
@@ -2373,6 +2373,7 @@
free(srv->id);
free(srv->cookie);
+ free(srv->rdr_pfx);
free(srv->hostname);
free(srv->hostname_dn);
free((char*)srv->conf.file);