You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
isisd: fix memory leak for MT settings static buffers
The multi-topology code in isis_mt.c uses three static buffers to avoid
repeated memory allocations during MT settings lookups. These buffers
are allocated using XREALLOC in area_mt_settings(), circuit_mt_settings(),
and circuit_bcast_mt_set(), growing as needed but never freed during
daemon shutdown.
This causes the memory leak checker to report three "ISIS MT Area Setting"
allocations per router at exit time, as the static buffers persist until
process termination without being properly released.
The fix moves these function-local static variables to file scope and
adds a new mt_fini() cleanup function that frees all three buffers during
daemon termination. This function is called from terminate() in isis_main.c
alongside the other cleanup functions, ensuring proper memory release
when isisd exits.
Signed-off-by: Vincent Jardin <vjardin@free.fr>
0 commit comments