From e00223a25dc7079e79cfaee0c9542f297be1a5fa Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Fri, 5 May 2006 23:15:56 +0000 Subject: [PATCH] Fix memory leak. --- src/slurmctld/agent.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c index 8cd573a99d7..7e66c146599 100644 --- a/src/slurmctld/agent.c +++ b/src/slurmctld/agent.c @@ -508,6 +508,12 @@ static void *_wdog(void *args) thd_comp.no_resp_cnt, thd_comp.retry_cnt); } + + for (i = 0; i < agent_ptr->thread_count; i++) { + if (thread_ptr[i].ret_list) + list_destroy(thread_ptr[i].ret_list); + } + if (thd_comp.max_delay) debug2("agent maximum delay %d seconds", thd_comp.max_delay); @@ -672,7 +678,6 @@ static void _notify_slurmctld_nodes(agent_info_t *agent_ptr, goto finished; } list_iterator_destroy(itr); - list_destroy(thread_ptr[i].ret_list); } finished: unlock_slurmctld(node_write_lock); -- GitLab