1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 18:23:13 +02:00

plugins: remove check of NULL pointers before calling weechat_hashtable_free() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-25 19:01:56 +02:00
parent 1ad0b4b669
commit 0b2d9bcb9b
41 changed files with 189 additions and 373 deletions
+3 -6
View File
@@ -97,10 +97,8 @@ logger_check_conditions (struct t_gui_buffer *buffer, const char *conditions)
condition_ok = (result && (strcmp (result, "1") == 0));
free (result);
if (pointers)
weechat_hashtable_free (pointers);
if (options)
weechat_hashtable_free (options);
weechat_hashtable_free (pointers);
weechat_hashtable_free (options);
return condition_ok;
}
@@ -137,8 +135,7 @@ logger_get_file_path ()
weechat_hashtable_set (options, "directory", "data");
path = weechat_string_eval_path_home (
weechat_config_string (logger_config_file_path), NULL, NULL, options);
if (options)
weechat_hashtable_free (options);
weechat_hashtable_free (options);
if (!path)
goto end;