mokutil/0005-mokutil-Fix-memory-leak-in-export_db_keys.patch
fly_fzc 64f1156acc backport mokutil: Fix memory leak in export_db_keys
(cherry picked from commit ea9ae52f4bceb6fae5a051e2837b1f4b78e1bb8b)
2024-06-06 17:41:52 +08:00

26 lines
608 B
Diff

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