[PATCH 1/2] fincore: fix file descriptor leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 misc-utils/fincore.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/misc-utils/fincore.c b/misc-utils/fincore.c
index ffc02fc2c..6a29f375a 100644
--- a/misc-utils/fincore.c
+++ b/misc-utils/fincore.c
@@ -239,6 +239,7 @@ static int fincore_name(struct fincore_control *ctl,
 
 	if (fstat (fd, sb) < 0) {
 		warn(_("failed to do fstat: %s"), name);
+		close (fd);
 		return -errno;
 	}
 
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux