From 26c03f6b4d19404d129428b5b3b0c3d4afdd9d90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Thu, 15 Dec 2016 14:23:37 -0500 Subject: [PATCH] Fix regression in errno handling cherry-pick MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- src/lxc/conf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; } -- 2.47.2