1
0
forked from pool/util-linux
util-linux/util-linux-2.13-mount_fd_leak.patch

13 lines
426 B
Diff

Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
===================================================================
--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c
+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c
@@ -325,6 +325,7 @@ set_loop(const char *device, const char
}
if ((fd = open(device, mode)) < 0) {
perror (device);
+ close(ffd);
return 1;
}
*loopro = (mode == O_RDONLY);