mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Fix memleak in several commands that used cmd_return_error when they should be using cmd_param_error, by Toby Peterson (Bug 213)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3715 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
abb28cae20
commit
bd8712dde1
@ -413,7 +413,7 @@ static void cmd_reconnect(const char *data, SERVER_REC *server)
|
||||
if (*data == '\0') {
|
||||
/* reconnect to first server in reconnection list */
|
||||
if (reconnects == NULL)
|
||||
cmd_return_error(CMDERR_NOT_CONNECTED);
|
||||
cmd_param_error(CMDERR_NOT_CONNECTED);
|
||||
rec = reconnects->data;
|
||||
} else {
|
||||
if (g_strncasecmp(data, "RECON-", 6) == 0)
|
||||
|
@ -143,7 +143,7 @@ static void cmd_ignore(const char *data)
|
||||
timestr = g_hash_table_lookup(optlist, "time");
|
||||
if (timestr != NULL) {
|
||||
if (!parse_time_interval(timestr, &msecs))
|
||||
cmd_return_error(CMDERR_INVALID_TIME);
|
||||
cmd_param_error(CMDERR_INVALID_TIME);
|
||||
}
|
||||
|
||||
if (active_win->active_server != NULL &&
|
||||
@ -211,7 +211,7 @@ static void cmd_unignore(const char *data)
|
||||
return;
|
||||
|
||||
if (*mask == '\0')
|
||||
cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
|
||||
if (is_numeric(mask, ' ')) {
|
||||
/* with index number */
|
||||
|
@ -103,7 +103,7 @@ static void fe_recode_add_cmd (const char *data, SERVER_REC *server, WI_ITEM_REC
|
||||
return;
|
||||
|
||||
if (! *first)
|
||||
cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
|
||||
if (*second) {
|
||||
target = first;
|
||||
|
@ -48,7 +48,7 @@ static void cmd_notify(gchar *data)
|
||||
idle_check_time = settings_get_time("notify_idle_time");
|
||||
else {
|
||||
if (!parse_time_interval(idletime, &idle_check_time))
|
||||
cmd_return_error(CMDERR_INVALID_TIME);
|
||||
cmd_param_error(CMDERR_INVALID_TIME);
|
||||
}
|
||||
|
||||
away_check = g_hash_table_lookup(optlist, "away") != NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user