mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
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.
This commit is contained in:
parent
d8ff676592
commit
1d1daff7c4
1 changed files with 1 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue