[PATCH] mount: fix fd leak

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

 



Signed-off-by: Matthias Koenig <mkoenig@xxxxxxx>
---

 mount/lomount.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mount/lomount.c b/mount/lomount.c
index 5bd8954..d91a99f 100644
--- a/mount/lomount.c
+++ b/mount/lomount.c
@@ -396,6 +396,7 @@ set_loop(const char *device, const char *file, unsigned long long offset,
 	}
 	if ((fd = open(device, mode)) < 0) {
 		perror (device);
+		close(ffd);
 		return 1;
 	}
 	*loopro = (mode == O_RDONLY);

-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" 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