From 0b2d9bcb9b04b7e7ac3c2f626422392383575d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 25 Apr 2024 19:01:56 +0200 Subject: plugins: remove check of NULL pointers before calling weechat_hashtable_free() (issue #865) --- src/plugins/script/script-config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/plugins/script/script-config.c') diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c index 80fa7fbe2..4ed83b507 100644 --- a/src/plugins/script/script-config.c +++ b/src/plugins/script/script-config.c @@ -174,8 +174,7 @@ script_config_get_xml_filename () weechat_hashtable_set (options, "directory", "cache"); path = weechat_string_eval_path_home ( weechat_config_string (script_config_scripts_path), NULL, NULL, options); - if (options) - weechat_hashtable_free (options); + weechat_hashtable_free (options); length = strlen (path) + 64; filename = malloc (length); if (filename) @@ -208,8 +207,7 @@ script_config_get_script_download_filename (struct t_script_repo *script, weechat_hashtable_set (options, "directory", "cache"); path = weechat_string_eval_path_home ( weechat_config_string (script_config_scripts_path), NULL, NULL, options); - if (options) - weechat_hashtable_free (options); + weechat_hashtable_free (options); length = strlen (path) + 1 + strlen (script->name_with_extension) + ((suffix) ? strlen (suffix) : 0) + 1; filename = malloc (length); -- cgit v1.2.3