diff options
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.patch | 29 |
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 @@ | |||
1 | From 36c3a19c62cc3b6841e363712c3c78ef5915122d Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Domsch <Matt_Domsch@dell.com> | ||
3 | Date: Thu, 23 Jul 2009 14:18:11 -0500 | ||
4 | Subject: [PATCH 3/5] fix minor memory leak | ||
5 | |||
6 | David Binderman noted new_data was being allocated but not freed. Not | ||
7 | a big deal as the program exits soon thereafter (and is thus freed), | ||
8 | but worth fixing anyhow. | ||
9 | |||
10 | Fixes https://bugzilla.novell.com/show_bug.cgi?id=524529#c1 | ||
11 | --- | ||
12 | src/efibootmgr/efibootmgr.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c | ||
16 | index 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 | -- | ||
28 | 1.8.0 | ||
29 | |||