From: Christian Brauner Date: Thu, 27 Jun 2019 12:27:39 +0000 (+0200) Subject: cgroups: use __do_free in cgfsng_attach() X-Git-Tag: lxc-4.0.0~158^2~6 X-Git-Url: https://git.proxmox.com/?p=mirror_lxc.git;a=commitdiff_plain;h=c05b17bd66142da80ab9031cb19ee8e4441c59e9 cgroups: use __do_free in cgfsng_attach() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index daa2a75d3..b0f90f222 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2097,8 +2097,7 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops, const char *name, return false; for (i = 0; ops->hierarchies[i]; i++) { - __do_free char *path = NULL; - char *fullpath = NULL; + __do_free char *fullpath = NULL, *path = NULL; struct hierarchy *h = ops->hierarchies[i]; if (h->version == CGROUP2_SUPER_MAGIC) {