From: Aurelien DARRAGON Date: Thu, 10 Apr 2025 14:57:58 +0000 (+0200) Subject: MINOR: flt_spoe: deinit spoe agent proxy upon agent release X-Git-Tag: v3.2-dev10~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3b231714f9c200abf8b0d99afca53f13cd3dc87;p=thirdparty%2Fhaproxy.git MINOR: flt_spoe: deinit spoe agent proxy upon agent release 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. --- diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 8e4ea48f6..cec31a855 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -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); }