projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
081cc95
)
sd-boot: properly free all config entry fields
author
Lennart Poettering
<lennart@poettering.net>
Wed, 20 Jun 2018 21:20:47 +0000
(23:20 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 16 Oct 2018 14:44:34 +0000
(16:44 +0200)
src/boot/efi/boot.c
patch
|
blob
|
history
diff --git
a/src/boot/efi/boot.c
b/src/boot/efi/boot.c
index
82b8939
..
cb04136
100644
(file)
--- a/
src/boot/efi/boot.c
+++ b/
src/boot/efi/boot.c
@@
-851,11
+851,17
@@
static VOID config_add_entry(Config *config, ConfigEntry *entry) {
}
static VOID config_entry_free(ConfigEntry *entry) {
+ if (!entry)
+ return;
+
+ FreePool(entry->id);
FreePool(entry->title_show);
FreePool(entry->title);
+ FreePool(entry->version);
FreePool(entry->machine_id);
FreePool(entry->loader);
FreePool(entry->options);
+ FreePool(entry);
}
static BOOLEAN is_digit(CHAR16 c) {
@@
-1151,7
+1157,6
@@
static VOID config_entry_add_from_file(
if (entry->type == LOADER_UNDEFINED) {
config_entry_free(entry);
- FreePool(entry);
return;
}