From ad33036fead1b0ca765494b521a5fb7c384b0be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 25 Apr 2024 19:32:00 +0200 Subject: [PATCH] core: remove check of NULL pointers before calling weelist_free() (issue #865) --- src/core/weechat.c | 3 +-- src/gui/gui-color.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/weechat.c b/src/core/weechat.c index 02cb8436a..bcc736ad4 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -582,8 +582,7 @@ weechat_shutdown (int return_code, int crash) free (weechat_runtime_dir); free (weechat_local_charset); free (weechat_force_plugin_autoload); - if (weechat_startup_commands) - weelist_free (weechat_startup_commands); + weelist_free (weechat_startup_commands); free (weechat_doc_gen_path); if (crash) diff --git a/src/gui/gui-color.c b/src/gui/gui-color.c index 689270628..3230d6cd6 100644 --- a/src/gui/gui-color.c +++ b/src/gui/gui-color.c @@ -2014,8 +2014,7 @@ gui_color_palette_free_structs () { hashtable_free (gui_color_hash_palette_color); hashtable_free (gui_color_hash_palette_alias); - if (gui_color_list_with_alias) - weelist_free (gui_color_list_with_alias); + weelist_free (gui_color_list_with_alias); } /*