]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: sink: free forward_px on deinit()
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 9 Mar 2023 11:07:09 +0000 (12:07 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:16 +0000 (08:58 +0200)
commit9b1d15f53a194a7704d7b8a1e27d8dd02fe2f17d
treefb8378e870b25d388561dd2759a1df892d60a2be
parent99a8d0f5d8dca2ce18f07a61f896687911fb6d64
BUG/MINOR: sink: free forward_px on deinit()

When a ring section is configured, a new sink is created and forward_px
proxy may be allocated and assigned to the sink.
Such sink-related proxies are added to the sink_proxies_list and thus
don't belong to the main proxy list which is cleaned up in
haproxy deinit() function.

We don't have to manually clean up sink_proxies_list in the main deinit()
func:
sink API already provides the sink_deinit() function so we just add the
missing free_proxy(sink->forward_px) there.

This could be backported up to 2.4.
[in 2.4, commit b0281a49 ("MINOR: proxy: check if p is NULL in free_proxy()")
must be backported first]
src/haproxy.c
src/sink.c