Blame SOURCES/efibootmgr-0.5.4-fix-minor-memory-leak.patch

8dd33d
From 36c3a19c62cc3b6841e363712c3c78ef5915122d Mon Sep 17 00:00:00 2001
8dd33d
From: Matt Domsch <Matt_Domsch@dell.com>
8dd33d
Date: Thu, 23 Jul 2009 14:18:11 -0500
8dd33d
Subject: [PATCH 3/5] fix minor memory leak
8dd33d
8dd33d
David Binderman noted new_data was being allocated but not freed.  Not
8dd33d
a big deal as the program exits soon thereafter (and is thus freed),
8dd33d
but worth fixing anyhow.
8dd33d
8dd33d
Fixes https://bugzilla.novell.com/show_bug.cgi?id=524529#c1
8dd33d
---
8dd33d
 src/efibootmgr/efibootmgr.c | 1 +
8dd33d
 1 file changed, 1 insertion(+)
8dd33d
8dd33d
diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c
8dd33d
index b984143..de67af0 100644
8dd33d
--- a/src/efibootmgr/efibootmgr.c
8dd33d
+++ b/src/efibootmgr/efibootmgr.c
8dd33d
@@ -328,6 +328,7 @@ add_to_boot_order(uint16_t num)
8dd33d
 	/* Now new_data has what we need */
8dd33d
 	memcpy(&(boot_order.Data), new_data, new_data_size);
8dd33d
 	boot_order.DataSize = new_data_size;
8dd33d
+	free(new_data);
8dd33d
 	return create_or_edit_variable(&boot_order);
8dd33d
 }
8dd33d
 
8dd33d
-- 
8dd33d
1.8.0
8dd33d