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