* Fri Apr 16 2021 Tomas Bzatek <tbzatek@redhat.com> - 9.60-4
- Fix fclose() on sysfs file write Resolves: #1947860
This commit is contained in:
parent
edb049b1e8
commit
55bb4c2e1c
13
hdparm-9.60-sysfs-fclose.patch
Normal file
13
hdparm-9.60-sysfs-fclose.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -up hdparm-9.60/sysfs.c.bak hdparm-9.60/sysfs.c
|
||||
--- hdparm-9.60/sysfs.c.bak 2021-04-15 15:48:56.806354847 +0200
|
||||
+++ hdparm-9.60/sysfs.c 2021-04-16 14:44:42.520395436 +0200
|
||||
@@ -61,7 +61,8 @@ static int sysfs_write_attr (char *path,
|
||||
if (count < 0)
|
||||
err = errno;
|
||||
}
|
||||
- fclose(fp);
|
||||
+ if (fp)
|
||||
+ fclose(fp);
|
||||
if (err && verbose) perror(path);
|
||||
*pathtail = '\0';
|
||||
return err;
|
@ -1,7 +1,7 @@
|
||||
Summary: A utility for displaying and/or setting hard disk parameters
|
||||
Name: hdparm
|
||||
Version: 9.60
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: BSD
|
||||
URL: https://sourceforge.net/projects/%{name}/
|
||||
Source: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||
@ -10,6 +10,7 @@ Patch1: %{name}-9.43-close_fd.patch
|
||||
Patch2: %{name}-9.43-get_geom.patch
|
||||
Patch3: %{name}-9.54-resourceleak-fixes.patch
|
||||
Patch4: %{name}-9.54-resourceleak-fixes-2.patch
|
||||
Patch5: %{name}-9.60-sysfs-fclose.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
@ -41,6 +42,9 @@ install -c -m 644 hdparm.8 $RPM_BUILD_ROOT%{_mandir}/man8
|
||||
%{_mandir}/man8/hdparm.8*
|
||||
|
||||
%changelog
|
||||
* Fri Apr 16 2021 Tomas Bzatek <tbzatek@redhat.com> - 9.60-4
|
||||
- Fix fclose() on sysfs file write
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 9.60-3
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user