The reason is that the generic code which handles reading
lxc.rootfs.mount always frees the old value if not NULL.
So without this setting lxc.rootfs.mount = /mnt causes
segfault.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
new->console.slave = -1;
new->console.name[0] = '\0';
new->maincmd_fd = -1;
- new->rootfs.mount = default_rootfs_mount;
+ new->rootfs.mount = strdup(default_rootfs_mount);
new->kmsg = 1;
lxc_list_init(&new->cgroup);
lxc_list_init(&new->network);
return;
if (conf->console.path)
free(conf->console.path);
- if (conf->rootfs.mount != default_rootfs_mount)
+ if (conf->rootfs.mount)
free(conf->rootfs.mount);
if (conf->rootfs.path)
free(conf->rootfs.path);