mtools/mtools-4.0.43-close.patch
Pavel Cahyna bb4602a1cb Prevent a file descriptor leak
Resolves: RHEL-44911
2024-08-21 14:18:17 +02:00

12 lines
407 B
Diff

diff -ur mtools-4.0.44/mpartition.c mtools-4.0.44-memleaks/mpartition.c
--- mtools-4.0.44/mpartition.c 2022-10-29 11:48:23.000000000 +0200
+++ mtools-4.0.44-memleaks/mpartition.c 2024-08-21 13:53:03.699524744 +0200
@@ -483,6 +483,7 @@
perror("read MBR");
exit(1);
}
+ close(fd);
}
memset((char *)(partTable+1), 0, 4*sizeof(*partTable));
set_word(((unsigned char*)buf)+510, 0xaa55);