mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
plugins: remove check of NULL pointers before calling weechat_hashtable_free() (issue #865)
This commit is contained in:
@@ -1179,8 +1179,7 @@ script_buffer_open ()
|
||||
&script_buffer_input_cb, NULL, NULL,
|
||||
&script_buffer_close_cb, NULL, NULL);
|
||||
|
||||
if (buffer_props)
|
||||
weechat_hashtable_free (buffer_props);
|
||||
weechat_hashtable_free (buffer_props);
|
||||
|
||||
if (!script_buffer)
|
||||
return;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1391,8 +1391,7 @@ script_repo_file_read (int quiet)
|
||||
script_repo_free (script);
|
||||
free (locale);
|
||||
free (locale_language);
|
||||
if (descriptions)
|
||||
weechat_hashtable_free (descriptions);
|
||||
weechat_hashtable_free (descriptions);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user