]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: use __do_free in cgfsng_attach()
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 27 Jun 2019 12:27:39 +0000 (14:27 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 11 Aug 2019 19:36:31 +0000 (21:36 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 6a300d556a0f220cfdddc66173ee9b64477de86e..633244e5b19db2cc0a225f6f7e5eebd9444edb8c 100644 (file)
@@ -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) {