confile: don't leak memory when overwriting lxc.rootfs.options

parent b4d341d7
...@@ -2465,6 +2465,10 @@ static int set_config_rootfs_options(const char *key, const char *value, ...@@ -2465,6 +2465,10 @@ static int set_config_rootfs_options(const char *key, const char *value,
struct lxc_rootfs *rootfs = &lxc_conf->rootfs; struct lxc_rootfs *rootfs = &lxc_conf->rootfs;
int ret; int ret;
clr_config_rootfs_options(key, lxc_conf, data);
if (lxc_config_value_empty(value))
return 0;
ret = parse_mntopts(value, &mflags, &mdata); ret = parse_mntopts(value, &mflags, &mdata);
if (ret < 0) if (ret < 0)
return ret_errno(EINVAL); return ret_errno(EINVAL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment