1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

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

This commit is contained in:
Sébastien Helleu
2024-04-25 00:20:01 +02:00
parent 3eed74a75c
commit 2b6fbe26ac
2 changed files with 3 additions and 6 deletions
+2 -4
View File
@@ -475,10 +475,8 @@ calc_expression (const char *expr)
calc_format_result (value, str_result, sizeof (str_result));
end:
if (list_values)
arraylist_free (list_values);
if (list_ops)
arraylist_free (list_ops);
arraylist_free (list_values);
arraylist_free (list_ops);
return strdup (str_result);
}
+1 -2
View File
@@ -490,8 +490,7 @@ hook_command_format_args_description (const char *args_description)
return string_dyn_free (result, 0);
error:
if (args)
arraylist_free (args);
arraylist_free (args);
if (result)
string_dyn_free (result, 1);
if (lines)