!21 [sync] PR-17: backport mokutil: Fix memory leak in export_db_keys
From: @openeuler-sync-bot Reviewed-by: @zhujianwei001 Signed-off-by: @zhujianwei001
This commit is contained in:
commit
6d37e287c6
25
0005-mokutil-Fix-memory-leak-in-export_db_keys.patch
Normal file
25
0005-mokutil-Fix-memory-leak-in-export_db_keys.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 71140ef59ac8f7bbe445fca2ba90a6833d3cb8c6 Mon Sep 17 00:00:00 2001
|
||||
From: gaoyusong <a869920004@163.com>
|
||||
Date: Thu, 22 Sep 2022 16:43:39 +0800
|
||||
Subject: [PATCH] mokutil: Fix memory leak in export_db_keys
|
||||
|
||||
Signed-off-by: gaoyusong <a869920004@163.com>
|
||||
---
|
||||
src/mokutil.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/mokutil.c b/src/mokutil.c
|
||||
index d445311..9e947d5 100644
|
||||
--- a/src/mokutil.c
|
||||
+++ b/src/mokutil.c
|
||||
@@ -1233,6 +1233,7 @@ export_db_keys (const DBName db_name)
|
||||
|
||||
list = build_mok_list (data, data_size, &mok_num);
|
||||
if (list == NULL) {
|
||||
+ free(data);
|
||||
return -1;
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: mokutil
|
||||
Version: 0.6.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Epoch: 1
|
||||
Summary: Tools for manipulating machine owner keys
|
||||
License: GPLv3+
|
||||
@ -10,6 +10,7 @@ Patch0001: 0001-Show-usage-instead-of-aborting-on-bad-flags.patch
|
||||
Patch0002: 0002-mokutil-bugfix-del-unused-opt-s.patch
|
||||
Patch0003: 0003-Fix-leak-of-list-in-delete_data_from_req_var.patch
|
||||
Patch0004: 0004-Fix-leak-of-fd-in-mok_get_variable.patch
|
||||
Patch0005: 0005-mokutil-Fix-memory-leak-in-export_db_keys.patch
|
||||
|
||||
BuildRequires:gcc autoconf automake gnu-efi git openssl-devel openssl efivar-devel >= 31-1 git
|
||||
Conflicts: shim < 0.8-1
|
||||
@ -61,6 +62,9 @@ make check
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Fri Dec 29 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1:0.6.0-2
|
||||
- mokutil: Fix memory leak in export_db_keys
|
||||
|
||||
* Wed Jun 29 2022 Chenxi Mao <chenxi.mao@suse.com> - 1:0.6.0-1
|
||||
- Update to 0.6.0 with latest bug fix
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user