]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: deviceatlas: fix resource leak on hot-reload compile failure
authorDavid Carlier <dcarlier@deviceatlas.com>
Sat, 14 Feb 2026 13:24:01 +0000 (13:24 +0000)
committerWilly Tarreau <w@1wt.eu>
Sat, 14 Feb 2026 13:47:22 +0000 (14:47 +0100)
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

index 88caefa8b0fe223a7de9a619f940312417cd7b54..cdd13a73dead80763d93e1de182cf964fd279580 100644 (file)
@@ -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);