42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From 6647a2439ba0e88aac2b1bfd313143e68c3b463a Mon Sep 17 00:00:00 2001
|
|
From: Aurelien DARRAGON <adarragon@haproxy.com>
|
|
Date: Fri, 15 Sep 2023 00:42:55 +0200
|
|
Subject: [PATCH] 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>
|
|
|
|
Conflict:NA
|
|
Reference:https://git.haproxy.org/?p=haproxy-2.6.git;a=commit;h=6647a2439ba0e88aac2b1bfd313143e68c3b463a
|
|
---
|
|
src/server.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/src/server.c b/src/server.c
|
|
index 7935668..70d4bc8 100644
|
|
--- a/src/server.c
|
|
+++ b/src/server.c
|
|
@@ -2377,6 +2377,7 @@ struct server *srv_drop(struct server *srv)
|
|
|
|
free(srv->id);
|
|
free(srv->cookie);
|
|
+ free(srv->rdr_pfx);
|
|
free(srv->hostname);
|
|
free(srv->hostname_dn);
|
|
free((char*)srv->conf.file);
|
|
--
|
|
1.7.10.4
|