From f7858f66f792c7862c28915fce467680e0f9c6b4 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 5bd89540..d91a99f3 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); -- 2.39.5