update to version 18
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
This commit is contained in:
parent
983551687b
commit
5205e33e41
@ -1,44 +0,0 @@
|
|||||||
From d9eb7f1536ed6262fc8c6518c6afe6053a450e9d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Jones <pjones@redhat.com>
|
|
||||||
Date: Tue, 28 May 2019 17:00:31 -0400
|
|
||||||
Subject: [PATCH] Get rid of a memory leak of deleted boot entries.
|
|
||||||
|
|
||||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
||||||
|
|
||||||
Conflict:NA
|
|
||||||
Reference:https://github.com/rhboot/efibootmgr/commit/d9eb7f1536ed6262fc8c6518c6afe6053a450e9d
|
|
||||||
---
|
|
||||||
src/efibootmgr.c | 9 ++++++---
|
|
||||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/efibootmgr.c b/src/efibootmgr.c
|
|
||||||
index 19a6edc..afcfc77 100644
|
|
||||||
--- a/src/efibootmgr.c
|
|
||||||
+++ b/src/efibootmgr.c
|
|
||||||
@@ -106,13 +106,12 @@ read_vars(char **namelist,
|
|
||||||
|
|
||||||
for (i=0; namelist[i] != NULL; i++) {
|
|
||||||
if (namelist[i]) {
|
|
||||||
- entry = malloc(sizeof(var_entry_t));
|
|
||||||
+ entry = calloc(1, sizeof(var_entry_t));
|
|
||||||
if (!entry) {
|
|
||||||
- efi_error("malloc(%zd) failed",
|
|
||||||
+ efi_error("calloc(1, %zd) failed",
|
|
||||||
sizeof(var_entry_t));
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
- memset(entry, 0, sizeof(var_entry_t));
|
|
||||||
|
|
||||||
rc = efi_get_variable(EFI_GLOBAL_GUID, namelist[i],
|
|
||||||
&entry->data, &entry->data_size,
|
|
||||||
@@ -611,6 +610,10 @@ delete_var(const char *prefix, uint16_t num)
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
list_del(&(entry->list));
|
|
||||||
+ free(entry->name);
|
|
||||||
+ free(entry->data);
|
|
||||||
+ memset(entry, 0, sizeof(*entry));
|
|
||||||
+ free(entry);
|
|
||||||
break; /* short-circuit since it was found */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
BIN
efibootmgr-18.tar.gz
Normal file
BIN
efibootmgr-18.tar.gz
Normal file
Binary file not shown.
@ -1,16 +1,14 @@
|
|||||||
Name: efibootmgr
|
Name: efibootmgr
|
||||||
Release: 2
|
Release: 1
|
||||||
Version: 17
|
Version: 18
|
||||||
Summary: A tool manipulating the EFI Boot Manager
|
Summary: A tool manipulating the EFI Boot Manager
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/rhboot/%{name}/
|
URL: https://github.com/rhboot/%{name}/
|
||||||
Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: remove_extra_decl.patch
|
|
||||||
Patch6000: backport-get-rid-of-a-memory-leak-of-deleted-boot-entries.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: efi-srpm-macros >= 3-2 efi-filesystem git popt-devel efivar-libs >= 35-2 efivar-devel >= 35-2
|
BuildRequires: efi-srpm-macros >= 3-2 efi-filesystem git popt-devel efivar-libs >= 38-1 efivar-devel >= 38-1
|
||||||
Requires: efi-filesystem
|
Requires: efi-filesystem
|
||||||
ExclusiveArch: %{efi}
|
ExclusiveArch: %{efi}
|
||||||
Conflicts: elilo <= 3.6-6
|
Conflicts: elilo <= 3.6-6
|
||||||
@ -32,7 +30,7 @@ Help package contains some readme, man and other related files for efibootmgr.
|
|||||||
git config --local --add %{name}.efidir %{efi_vendor}
|
git config --local --add %{name}.efidir %{efi_vendor}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build
|
%make_build CFLAGS='%{optflags}' LDFLAGS='%{build_ldflags}'
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -49,6 +47,9 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/*/*.?.gz
|
%{_mandir}/*/*.?.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 18 2022 zhangqiumiao <zhangqiumiao1@huawei.com> - 18-1
|
||||||
|
- update to verion 18
|
||||||
|
|
||||||
* Mon Apr 25 2022 yangcheng <yangcheng87@h-partners.com> - 17-2
|
* Mon Apr 25 2022 yangcheng <yangcheng87@h-partners.com> - 17-2
|
||||||
- rebuild efibootmgr
|
- rebuild efibootmgr
|
||||||
|
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Jones <pjones@redhat.com>
|
|
||||||
Date: Wed, 13 Jun 2018 09:41:01 -0400
|
|
||||||
Subject: [PATCH] remove extra decl
|
|
||||||
|
|
||||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
||||||
---
|
|
||||||
src/efibootmgr.c | 3 ---
|
|
||||||
1 file changed, 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/efibootmgr.c b/src/efibootmgr.c
|
|
||||||
index de38f01..4e1a680 100644
|
|
||||||
--- a/src/efibootmgr.c
|
|
||||||
+++ b/src/efibootmgr.c
|
|
||||||
@@ -1536,9 +1536,6 @@ parse_opts(int argc, char **argv)
|
|
||||||
"invalid numeric value %s\n",
|
|
||||||
optarg);
|
|
||||||
}
|
|
||||||
- /* XXX efivar-36 accidentally doesn't have a public
|
|
||||||
- * header for this */
|
|
||||||
- extern int efi_set_verbose(int verbosity, FILE *errlog);
|
|
||||||
efi_set_verbose(opts.verbose - 2, stderr);
|
|
||||||
break;
|
|
||||||
case 'V':
|
|
||||||
Loading…
x
Reference in New Issue
Block a user