storage: fix dup_cloexec() call

Fixes: Coverity 1477399 Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 7a2bd5db
...@@ -346,7 +346,7 @@ struct lxc_storage *storage_copy(struct lxc_container *c, const char *cname, ...@@ -346,7 +346,7 @@ struct lxc_storage *storage_copy(struct lxc_container *c, const char *cname,
orig = c->lxc_conf->rootfs.storage; orig = c->lxc_conf->rootfs.storage;
if (c->lxc_conf->rootfs.dfd_idmapped >= 0) { if (c->lxc_conf->rootfs.dfd_idmapped >= 0) {
new_rootfs.dfd_idmapped = dup_cloexec(new_rootfs.dfd_idmapped); new_rootfs.dfd_idmapped = dup_cloexec(c->lxc_conf->rootfs.dfd_idmapped);
if (new_rootfs.dfd_idmapped < 0) { if (new_rootfs.dfd_idmapped < 0) {
SYSERROR("Failed to duplicate user namespace file descriptor"); SYSERROR("Failed to duplicate user namespace file descriptor");
lxc_storage_put(c->lxc_conf); lxc_storage_put(c->lxc_conf);
......
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