From c650bbb8a3296fc4a60bb77d8c417948526621b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 6 Oct 2023 18:11:03 +0200 Subject: [PATCH] efi/boot: use DEFINE_TRIVIAL_CLEANUP_FUNC() in one more place No functional change. --- src/boot/efi/boot.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index de801ceb37d..f04971ebd60 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1117,9 +1117,9 @@ static void config_add_entry(Config *config, ConfigEntry *entry) { config->entries[config->n_entries++] = entry; } -static void config_entry_free(ConfigEntry *entry) { +static ConfigEntry* config_entry_free(ConfigEntry *entry) { if (!entry) - return; + return NULL; free(entry->id); free(entry->title_show); @@ -1134,13 +1134,12 @@ static void config_entry_free(ConfigEntry *entry) { free(entry->path); free(entry->current_name); free(entry->next_name); - free(entry); -} -static void config_entry_freep(ConfigEntry **entry) { - config_entry_free(*entry); + return mfree(entry); } +DEFINE_TRIVIAL_CLEANUP_FUNC(ConfigEntry *, config_entry_free); + static char *line_get_key_value( char *content, const char *sep, -- 2.47.3