summaryrefslogtreecommitdiffstats
path: root/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch')
-rw-r--r--meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch
new file mode 100644
index 0000000..1ff4ce3
--- /dev/null
+++ b/meta-linaro/recipes-extra/efibootmgr/files/efibootmgr-0.5.4-fix-minor-memory-leak.patch
@@ -0,0 +1,29 @@
1From 36c3a19c62cc3b6841e363712c3c78ef5915122d Mon Sep 17 00:00:00 2001
2From: Matt Domsch <Matt_Domsch@dell.com>
3Date: Thu, 23 Jul 2009 14:18:11 -0500
4Subject: [PATCH 3/5] fix minor memory leak
5
6David Binderman noted new_data was being allocated but not freed. Not
7a big deal as the program exits soon thereafter (and is thus freed),
8but worth fixing anyhow.
9
10Fixes https://bugzilla.novell.com/show_bug.cgi?id=524529#c1
11---
12 src/efibootmgr/efibootmgr.c | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c
16index b984143..de67af0 100644
17--- a/src/efibootmgr/efibootmgr.c
18+++ b/src/efibootmgr/efibootmgr.c
19@@ -328,6 +328,7 @@ add_to_boot_order(uint16_t num)
20 /* Now new_data has what we need */
21 memcpy(&(boot_order.Data), new_data, new_data_size);
22 boot_order.DataSize = new_data_size;
23+ free(new_data);
24 return create_or_edit_variable(&boot_order);
25 }
26
27--
281.8.0
29