]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix regression in errno handling cherry-pick
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 15 Dec 2016 19:23:37 +0000 (14:23 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 15 Dec 2016 19:24:02 +0000 (14:24 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/conf.c

index b1d2fa77d8fa7844b9a5820fb79f928ab55ab783..45ff900068d9f0e7fae02c9b5956b3074147eb51 100644 (file)
@@ -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;
        }