mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 15:26:37 +02:00
plugins: remove check of NULL pointers before calling weechat_string_free_split() (issue #865)
This commit is contained in:
@@ -981,8 +981,7 @@ end:
|
||||
string_modified = (ptr_string && (strcmp (ptr_string, string) != 0)) ?
|
||||
strdup (ptr_string) : NULL;
|
||||
|
||||
if (tags)
|
||||
weechat_string_free_split (tags);
|
||||
weechat_string_free_split (tags);
|
||||
free (string_no_color);
|
||||
|
||||
TRIGGER_CALLBACK_CB_END(string_modified);
|
||||
@@ -1120,8 +1119,7 @@ trigger_callback_line_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
end:
|
||||
if (tags)
|
||||
weechat_string_free_split (tags);
|
||||
weechat_string_free_split (tags);
|
||||
|
||||
TRIGGER_CALLBACK_CB_END(hashtable);
|
||||
}
|
||||
|
||||
@@ -436,8 +436,7 @@ trigger_command_list_default (int verbose)
|
||||
}
|
||||
|
||||
trigger_regex_free (®ex_count, ®ex);
|
||||
if (commands)
|
||||
weechat_string_free_split (commands);
|
||||
weechat_string_free_split (commands);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -838,8 +837,7 @@ trigger_command_trigger (const void *pointer, void *data,
|
||||
weechat_buffer_set (buffer, "input_pos", "13");
|
||||
free (input);
|
||||
}
|
||||
if (items)
|
||||
weechat_string_free_split (items);
|
||||
weechat_string_free_split (items);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -1242,8 +1240,7 @@ error:
|
||||
rc = WEECHAT_RC_ERROR;
|
||||
|
||||
end:
|
||||
if (sargv)
|
||||
weechat_string_free_split (sargv);
|
||||
weechat_string_free_split (sargv);
|
||||
|
||||
if (rc == WEECHAT_RC_ERROR)
|
||||
WEECHAT_COMMAND_ERROR;
|
||||
|
||||
@@ -598,10 +598,8 @@ trigger_hook (struct t_trigger *trigger)
|
||||
trigger->name);
|
||||
}
|
||||
|
||||
if (argv)
|
||||
weechat_string_free_split (argv);
|
||||
if (argv_eol)
|
||||
weechat_string_free_split (argv_eol);
|
||||
weechat_string_free_split (argv);
|
||||
weechat_string_free_split (argv_eol);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1235,8 +1233,7 @@ trigger_free (struct t_trigger *trigger)
|
||||
if (trigger->options[i])
|
||||
weechat_config_option_free (trigger->options[i]);
|
||||
}
|
||||
if (trigger->commands)
|
||||
weechat_string_free_split (trigger->commands);
|
||||
weechat_string_free_split (trigger->commands);
|
||||
|
||||
free (trigger);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user