From: Stéphane Graber Date: Thu, 15 Dec 2016 19:23:37 +0000 (-0500) Subject: Fix regression in errno handling cherry-pick X-Git-Tag: lxc-1.0.10~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26c03f6b4d19404d129428b5b3b0c3d4afdd9d90;p=thirdparty%2Flxc.git Fix regression in errno handling cherry-pick Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index b1d2fa77d..45ff90006 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2513,10 +2513,7 @@ static int setup_mount_entries(const struct lxc_rootfs *rootfs, struct lxc_list file = tmpfile(); if (!file) { - int saved_errno = errno; - if (fd != -1) - close(fd); - ERROR("Could not create mount entry file: %s.", strerror(saved_errno)); + ERROR("Could not create temporary file: %s.", strerror(errno)); return -1; }