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.
This commit is contained in:
David Carlier 2026-02-14 13:24:01 +00:00 committed by Willy Tarreau
parent ea3b1bb866
commit d8ff676592

View 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);