mirror of
https://github.com/git/git.git
synced 2026-03-04 14:37:35 +01:00
fsmonitor: fix hashmap memory leak in fsmonitor_run_daemon
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 <github@paulisageek.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0ecf18fc7e
commit
4187776953
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user