From adf56fcac0d49492dfed3485e07904ebbb2c6ada Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Fri, 6 Jun 2014 15:41:33 -0700 Subject: [PATCH] cgroup memory leak fix on reconfig --- src/slurmd/common/slurmd_cgroup.c | 2 +- src/slurmd/slurmd/slurmd.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/slurmd/common/slurmd_cgroup.c b/src/slurmd/common/slurmd_cgroup.c index 90f692f405a..7ecca73c4d5 100644 --- a/src/slurmd/common/slurmd_cgroup.c +++ b/src/slurmd/common/slurmd_cgroup.c @@ -297,7 +297,7 @@ error: } extern void fini_system_cgroup(void) -{ +{dd xcgroup_destroy(&system_cpuset_cg); xcgroup_destroy(&system_memory_cg); xcgroup_ns_destroy(&cpuset_ns); diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 47a927417fc..85c588a4ecd 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -1948,13 +1948,7 @@ static int _set_topo_info(void) */ static int _resource_spec_init(void) { - static bool first_run = true; - - if (first_run) { - fini_system_cgroup(); /* Prevent memory leak */ - first_run = false; - } - + fini_system_cgroup(); /* Prevent memory leak */ if (_core_spec_init() != SLURM_SUCCESS) error("Resource spec: core specialization disabled"); if (_memory_spec_init() != SLURM_SUCCESS) -- GitLab