Prevent a file descriptor leak
Resolves: RHEL-44911
This commit is contained in:
parent
94f8f529d5
commit
bb4602a1cb
11
mtools-4.0.43-close.patch
Normal file
11
mtools-4.0.43-close.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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);
|
@ -8,6 +8,7 @@ Url: https://www.gnu.org/software/mtools/
|
|||||||
Patch0: mtools-3.9.6-config.patch
|
Patch0: mtools-3.9.6-config.patch
|
||||||
Patch1: mtools-4.0.43-errmsgsize.patch
|
Patch1: mtools-4.0.43-errmsgsize.patch
|
||||||
Patch2: mtools-4.0.43-iconv_close.patch
|
Patch2: mtools-4.0.43-iconv_close.patch
|
||||||
|
Patch3: mtools-4.0.43-close.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -35,6 +36,7 @@ Mtools should be installed if you need to use MS-DOS disks
|
|||||||
%patch 0 -p1 -b .conf
|
%patch 0 -p1 -b .conf
|
||||||
%patch 1 -p1
|
%patch 1 -p1
|
||||||
%patch 2 -p1
|
%patch 2 -p1
|
||||||
|
%patch 3 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
|
Loading…
Reference in New Issue
Block a user