]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: flt_spoe: deinit spoe agent proxy upon agent release
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 10 Apr 2025 14:57:58 +0000 (16:57 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 10 Apr 2025 20:10:31 +0000 (22:10 +0200)
Even though spoe agent proxy is statically allocated, it uses the proxy
API and is initialized like a regular proxy, thus specific cleanup is
required upon release. This is not tagged as a bug because as of now this
would only cause some minor memory leak upon deinit.

We check the presence of proxy->id to know if it was initialized since
we cannot rely on a pointer for that.

src/flt_spoe.c

index 8e4ea48f6d44e61afb9965349691431109946607..cec31a8559d54072270ba4b2303b1114143a0a27 100644 (file)
@@ -321,6 +321,8 @@ static void spoe_release_agent(struct spoe_agent *agent)
        }
        free(agent->events);
        free(agent->engine_id);
+       if (agent->fe.id)
+               deinit_proxy(&agent->fe);
        free(agent);
 }