From: Christian Brauner Date: Fri, 19 Feb 2021 23:39:47 +0000 (+0100) Subject: cgroups: s/must_copy_string()/strdup()/g X-Git-Tag: lxc-5.0.0~274^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a0c8ed32c142f8f5fc34c95c372b09eadaa7587;p=thirdparty%2Flxc.git cgroups: s/must_copy_string()/strdup()/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 495785083..49ae6dee1 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -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, ",")