summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorEric Andersen2003-05-02 16:25:01 +0000
committerEric Andersen2003-05-02 16:25:01 +0000
commit7b3edeb14d46d25bc1bb8a732d951e6075e7e59c (patch)
treea5451e4f15ed746128b844259cf99702dffebd40 /libbb
parenta860bec167faa960231b7f3c1ca55a49cda5a9d2 (diff)
downloadbusybox-7b3edeb14d46d25bc1bb8a732d951e6075e7e59c.zip
busybox-7b3edeb14d46d25bc1bb8a732d951e6075e7e59c.tar.gz
Patch from Dmitry V. Levin to fix a fd leak
Diffstat (limited to 'libbb')
-rw-r--r--libbb/loop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/loop.c b/libbb/loop.c
index 29128ab..aae083b 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -37,6 +37,7 @@ extern int del_loop(const char *device)
return (FALSE);
}
if (ioctl(fd, LOOP_CLR_FD, 0) < 0) {
+ close(fd);
bb_perror_msg("ioctl: LOOP_CLR_FD");
return (FALSE);
}