1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

core: remove check of NULL pointers before calling free() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-25 00:18:30 +02:00
parent b56b34711d
commit e73bff95fa
55 changed files with 394 additions and 802 deletions
+7 -16
View File
@@ -889,17 +889,11 @@ completion_list_add_filename_cb (const void *pointer, void *data,
closedir (dp);
end:
if (real_prefix)
free (real_prefix);
if (prefix)
free (prefix);
if (path_dir)
free (path_dir);
if (path_base)
free (path_base);
if (dir_name)
free (dir_name);
free (real_prefix);
free (prefix);
free (path_dir);
free (path_base);
free (dir_name);
return WEECHAT_RC_OK;
}
@@ -1649,11 +1643,8 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
}
}
if (file)
free (file);
if (section)
free (section);
free (file);
free (section);
free (option_full_name);
return WEECHAT_RC_OK;