summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-25 19:32:00 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-26 21:06:47 +0200
commitad33036fead1b0ca765494b521a5fb7c384b0be6 (patch)
tree87749b8836e836619cc1cc25c6d6090854cc37a9
parenta59fa70a948eaa93d0708711714bb5cc724451f9 (diff)
downloadweechat-ad33036fead1b0ca765494b521a5fb7c384b0be6.zip
core: remove check of NULL pointers before calling weelist_free() (issue #865)
-rw-r--r--src/core/weechat.c3
-rw-r--r--src/gui/gui-color.c3
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);
}
/*