diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index c1813e21fe646817ab0275a83c3909d1a2cc1ae4..3c4078461dabac77a4fbacd795be876a80139af3 100644 --- a/src/lxc/lxc_cgroup.c +++ b/src/lxc/lxc_cgroup.c @@ -77,6 +77,8 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def, if (virCgroupSetCpusetCpus(cgroup, mask) < 0) goto cleanup; + /* free mask to make sure we won't use it in a wrong way later */ + VIR_FREE(mask); } if (virDomainNumatuneGetMode(def->numa, -1) !=