From: Paul Tarjan via GitGitGadget Date: Thu, 26 Feb 2026 00:27:15 GMT Subject: [PATCH v7 02/10] fsmonitor: fix hashmap memory leak in fsmonitor_run_daemon Message-ID: In-Reply-To: From: Paul Tarjan The `state.cookies` hashmap is initialized during daemon startup but never freed during cleanup in the `done:` label of fsmonitor_run_daemon(). Add a hashmap_clear() call to prevent this memory leak. Signed-off-by: Paul Tarjan --- builtin/fsmonitor--daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c index bc4571938c..4d52622e24 100644 --- a/builtin/fsmonitor--daemon.c +++ b/builtin/fsmonitor--daemon.c @@ -1404,6 +1404,7 @@ static int fsmonitor_run_daemon(void) done: pthread_cond_destroy(&state.cookies_cond); pthread_mutex_destroy(&state.main_lock); + hashmap_clear(&state.cookies); fsm_listen__dtor(&state); fsm_health__dtor(&state); -- gitgitgadget