Commit d0218321 by Serge Hallyn

clone: make sure to update the rootfs path in unexpanded conf

parent 761d81ca
...@@ -2546,6 +2546,12 @@ static int copy_storage(struct lxc_container *c0, struct lxc_container *c, ...@@ -2546,6 +2546,12 @@ static int copy_storage(struct lxc_container *c0, struct lxc_container *c,
ERROR("Out of memory while setting storage path"); ERROR("Out of memory while setting storage path");
return -1; return -1;
} }
free(c->lxc_unexp_conf->rootfs.path);
c->lxc_unexp_conf->rootfs.path = strdup(c->lxc_conf->rootfs.path);
if (!c->lxc_unexp_conf->rootfs.path) {
ERROR("Out of memory while setting storage path");
return -1;
}
if (flags & LXC_CLONE_SNAPSHOT) if (flags & LXC_CLONE_SNAPSHOT)
copy_rdepends(c, c0); copy_rdepends(c, c0);
if (need_rdep) { if (need_rdep) {
......
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