Skip to content
Snippets Groups Projects
Commit 42fd9638 authored by Moe Jette's avatar Moe Jette
Browse files

Plug possible memory leak on reconfig command.

parent e1147ea9
No related branches found
No related tags found
No related merge requests found
...@@ -821,13 +821,16 @@ static void _restore_node_state(struct node_record *old_node_table_ptr, ...@@ -821,13 +821,16 @@ static void _restore_node_state(struct node_record *old_node_table_ptr,
node_ptr = find_node_record(old_node_table_ptr[i].name); node_ptr = find_node_record(old_node_table_ptr[i].name);
if (node_ptr == NULL) if (node_ptr == NULL)
continue; continue;
node_ptr->node_state = old_node_table_ptr[i].node_state; node_ptr->node_state = old_node_table_ptr[i].node_state;
node_ptr->last_response = old_node_table_ptr[i].last_response; node_ptr->last_response = old_node_table_ptr[i].last_response;
node_ptr->cpus = old_node_table_ptr[i].cpus; node_ptr->cpus = old_node_table_ptr[i].cpus;
node_ptr->real_memory = old_node_table_ptr[i].real_memory; node_ptr->real_memory = old_node_table_ptr[i].real_memory;
node_ptr->tmp_disk = old_node_table_ptr[i].tmp_disk; node_ptr->tmp_disk = old_node_table_ptr[i].tmp_disk;
node_ptr->reason = old_node_table_ptr[i].reason; if(node_ptr->reason == NULL) {
old_node_table_ptr[i].reason = NULL; /* Recover only if not explicitly set in slurm.conf */
node_ptr->reason = old_node_table_ptr[i].reason;
old_node_table_ptr[i].reason = NULL;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment