From: David Carlier Date: Sat, 14 Feb 2026 13:24:02 +0000 (+0000) Subject: BUG/MINOR: deviceatlas: fix deinit to only finalize when initialized X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d1daff7c4b5806a0fa98f6d7356b03dce209dcc;p=thirdparty%2Fhaproxy.git BUG/MINOR: deviceatlas: fix deinit to only finalize when initialized da_fini() was called unconditionally in deinit_deviceatlas() even when da_init() was never called. Move it inside the daset check. Also remove the erroneous shm_unlink() call which could affect the dadwsch shared memory used by the scheduling process. This should be backported to lower branches. --- diff --git a/addons/deviceatlas/da.c b/addons/deviceatlas/da.c index cdd13a73d..d919fb7e5 100644 --- a/addons/deviceatlas/da.c +++ b/addons/deviceatlas/da.c @@ -253,15 +253,13 @@ static void deinit_deviceatlas(void) free(global_deviceatlas.cookiename); da_atlas_close(&global_deviceatlas.atlas); free(global_deviceatlas.atlasimgptr); + da_fini(); } if (global_deviceatlas.atlasfd != -1) { munmap(global_deviceatlas.atlasmap, ATLASTOKSZ); close(global_deviceatlas.atlasfd); - shm_unlink(ATLASMAPNM); } - - da_fini(); } static void da_haproxy_checkinst(void)