From d8ff67659217321e8893d566a1c9fa441f5c01ce Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 14 Feb 2026 13:24:01 +0000 Subject: [PATCH] BUG/MINOR: deviceatlas: fix resource leak on hot-reload compile failure In da_haproxy_checkinst(), when da_atlas_compile() failed, the cnew buffer was leaked. Add a free(cnew) in the else branch. This should be backported to lower branches. --- addons/deviceatlas/da.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/deviceatlas/da.c b/addons/deviceatlas/da.c index 88caefa8b..cdd13a73d 100644 --- a/addons/deviceatlas/da.c +++ b/addons/deviceatlas/da.c @@ -312,6 +312,8 @@ static void da_haproxy_checkinst(void) ha_alert("deviceatlas : instance update failed.\n"); free(cnew); } + } else { + free(cnew); } #ifdef USE_THREAD HA_SPIN_UNLOCK(OTHER_LOCK, &dadwsch_lock);