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:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user