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

trigger: remove check of NULL pointers before calling trigger_free() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-25 20:24:12 +02:00
parent 2b919b0a01
commit 4a058ae0f5
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -1161,8 +1161,7 @@ trigger_command_trigger (const void *pointer, void *data,
}
else
{
if (ptr_trigger)
trigger_free (ptr_trigger);
trigger_free (ptr_trigger);
ptr_trigger = trigger_new (
trigger_config_default_list[j][0], /* name */
trigger_config_default_list[j][1], /* enabled */
+1 -1
View File
@@ -629,7 +629,7 @@ TEST(Trigger, New)
POINTERS_EQUAL(NULL, trigger_search_with_option (NULL));
POINTERS_EQUAL(NULL, trigger_search_with_option (config_look_day_change));
/* invalid free */
/* test free of NULL trigger */
trigger_free (NULL);
}