From: Eric Andersen Date: Fri, 2 May 2003 16:25:01 +0000 (-0000) Subject: Patch from Dmitry V. Levin to fix a fd leak X-Git-Tag: 1_00_pre1~96 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7b3edeb14d46d25bc1bb8a732d951e6075e7e59c;p=oweals%2Fbusybox.git Patch from Dmitry V. Levin to fix a fd leak --- diff --git a/libbb/loop.c b/libbb/loop.c index 29128abe4..aae083b4a 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); }