]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: s/must_copy_string()/strdup()/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Feb 2021 23:39:47 +0000 (00:39 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Feb 2021 23:40:32 +0000 (00:40 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 4957850831e2cd9786366dd2374b5ab9be27b14e..49ae6dee1f48ed2466af18fa1a8cdbe5bdb9f893 100644 (file)
@@ -3513,7 +3513,9 @@ static int __cgroup_init(struct cgroup_ops *ops, struct lxc_conf *conf)
                __do_free char *pin = NULL;
                char *chop, *cur;
 
-               pin = must_copy_string(tmp);
+               pin = strdup(tmp);
+               if (!pin)
+                       return -errno;
                chop = pin;
 
                lxc_iterate_parts(cur, chop, ",")