From: Christian Brauner Date: Thu, 11 Jun 2020 15:34:08 +0000 (+0200) Subject: lxccontainer: remove pointless string duplication X-Git-Tag: lxc-5.0.0~419^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=472a2ff9539bbf26d59016e6375347a4e40310f7;p=thirdparty%2Flxc.git lxccontainer: remove pointless string duplication Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 9c9d023b8..57abcbd7b 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1185,7 +1185,6 @@ WRAP_API(bool, lxcapi_stop) static int do_create_container_dir(const char *path, struct lxc_conf *conf) { - __do_free char *p = NULL; int lasterr; int ret = -1; @@ -1201,10 +1200,8 @@ static int do_create_container_dir(const char *path, struct lxc_conf *conf) ret = 0; } - p = must_copy_string(path); - if (!lxc_list_empty(&conf->id_map)) { - ret = chown_mapped_root(p, conf); + ret = chown_mapped_root(path, conf); if (ret < 0) ret = -1; }