]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: proxy: free orgto_hdr_name in free_proxy()
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 28 Dec 2022 11:18:15 +0000 (12:18 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Jan 2023 14:20:41 +0000 (15:20 +0100)
Unlike fwdfor_hdr_name, orgto_hdr_name was not properly freed in
free_proxy().

This did not cause observable memory leaks because originalto proxy option is
only used for user configurable proxies, which are solely freed right before
process termination.
No backport needed unless some architectural changes causing regular proxies
to be freed and reused multiple times within single process lifetime are made.

src/proxy.c

index 1279da6f26ee51f7e44f6f946a11dd13009d5915..8bcc98c0d92c5dc20fbb132d25e062c91c569bb3 100644 (file)
@@ -350,6 +350,7 @@ void free_proxy(struct proxy *p)
 
        free(p->desc);
        istfree(&p->fwdfor_hdr_name);
+       istfree(&p->orgto_hdr_name);
 
        task_destroy(p->task);