From 472a2ff9539bbf26d59016e6375347a4e40310f7 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 11 Jun 2020 17:34:08 +0200 Subject: [PATCH] lxccontainer: remove pointless string duplication Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; } -- 2.47.2