--- util-linux-ng-2.13rc2+git20070725/mount/lomount.c.org 2007-08-16 17:09:33.258902000 +0200 +++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c 2007-08-16 17:09:43.016135000 +0200 @@ -398,6 +398,7 @@ } if (ioctl (fd, LOOP_CLR_FD, 0) < 0) { perror ("ioctl: LOOP_CLR_FD"); + close(fd); return 1; } close (fd); --- util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c.org 2007-08-16 18:16:03.120065000 +0200 +++ util-linux-ng-2.13rc2+git20070725/mount/fsprobe_volumeid.c 2007-08-16 18:27:43.967526000 +0200 @@ -34,8 +34,10 @@ return NULL; id = volume_id_open_fd(fd); - if (!id) + if (!id) { + close(fd); return NULL; + } /* TODO: use blkdev_get_size() */ if (ioctl(fd, BLKGETSIZE64, &size) != 0) @@ -61,6 +63,7 @@ } volume_id_close(id); + close(fd); return value; }