From 7645487b42adfa9eaf2bee81d80812cd227a90c5 Mon Sep 17 00:00:00 2001 From: Matthias Koenig Date: Wed, 21 Nov 2007 16:46:33 +0100 Subject: [PATCH] mount: fix fd leak Signed-off-by: Matthias Koenig --- mount/lomount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mount/lomount.c b/mount/lomount.c index 02548cc2..a94a7f0b 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -291,6 +291,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); -- 2.39.5