]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: free mount data 3843/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 18 May 2021 18:23:17 +0000 (20:23 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 19 May 2021 12:21:52 +0000 (14:21 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 1a18737623a5bf1a5dbfacdf180590dc9ff865ec..6e2b68b1cf727bfabcd69e49283f1c31cfe7e77d 100644 (file)
@@ -2786,7 +2786,7 @@ static int set_config_rootfs_mount(const char *key, const char *value,
 static int set_config_rootfs_options(const char *key, const char *value,
                                     struct lxc_conf *lxc_conf, void *data)
 {
-       __do_free char *dup = NULL, *mdata = NULL, *opts = NULL;
+       __do_free char *__data = NULL, *dup = NULL, *mdata = NULL, *opts = NULL;
        struct lxc_rootfs *rootfs = &lxc_conf->rootfs;
        struct lxc_mount_options *mnt_opts = &rootfs->mnt_opts;
        int ret;
@@ -2802,6 +2802,7 @@ static int set_config_rootfs_options(const char *key, const char *value,
        ret = parse_lxc_mount_attrs(mnt_opts, dup);
        if (ret < 0)
                return ret;
+       __data = mnt_opts->data;
 
        ret = parse_mntopts_legacy(dup, &mnt_opts->mnt_flags, &mdata);
        if (ret < 0)