diff options
author | Matthias Koenig | 2007-11-21 16:46:33 +0100 |
---|---|---|
committer | Karel Zak | 2007-11-26 14:04:15 +0100 |
commit | f7858f66f792c7862c28915fce467680e0f9c6b4 (patch) | |
tree | 5ae0c481e05c4ada9f69e6f1424d8d0ec68fe15e /mount/lomount.c | |
parent | swapon: cleanup usage output (diff) | |
download | kernel-qcow2-util-linux-f7858f66f792c7862c28915fce467680e0f9c6b4.tar.gz kernel-qcow2-util-linux-f7858f66f792c7862c28915fce467680e0f9c6b4.tar.xz kernel-qcow2-util-linux-f7858f66f792c7862c28915fce467680e0f9c6b4.zip |
mount: fix fd leak
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Diffstat (limited to 'mount/lomount.c')
-rw-r--r-- | mount/lomount.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mount/lomount.c b/mount/lomount.c index 5bd895407..d91a99f34 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); |