]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: remove pointless string duplication 3446/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 11 Jun 2020 15:34:08 +0000 (17:34 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 11 Jun 2020 16:24:21 +0000 (18:24 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 9c9d023b874227e221884e58b4cf27667f1bbd52..57abcbd7bf5fb4d69816e994f68a100ed3b6bcc9 100644 (file)
@@ -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;
        }