Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2017 06:56:21 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326791 - head/usr.bin/gzip
Message-ID:  <201712120656.vBC6uL45004185@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Dec 12 06:56:21 2017
New Revision: 326791
URL: https://svnweb.freebsd.org/changeset/base/326791

Log:
  Close the correct file descriptor.
  
  MFC after:	2 weeks

Modified:
  head/usr.bin/gzip/gzip.c

Modified: head/usr.bin/gzip/gzip.c
==============================================================================
--- head/usr.bin/gzip/gzip.c	Tue Dec 12 04:08:30 2017	(r326790)
+++ head/usr.bin/gzip/gzip.c	Tue Dec 12 06:56:21 2017	(r326791)
@@ -1718,7 +1718,7 @@ file_uncompress(char *file, char *outfile, size_t outs
 	if (fd != -1)
 		close(fd);
 	if (zfd != -1 && zfd != STDOUT_FILENO)
-		close(fd);
+		close(zfd);
 	return -1;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712120656.vBC6uL45004185>