diff options
author | Wouter Coekaerts <coekie@irssi.org> | 2005-03-06 18:45:47 +0000 |
---|---|---|
committer | coekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2005-03-06 18:45:47 +0000 |
commit | bd8712dde1b4d9ad2ee261811bf41163e28f02cd (patch) | |
tree | e6a876c74f8aa49b0d7eee95720797ceb6236bce | |
parent | abb28cae201b26d29fdc129b0562a35edb613696 (diff) | |
download | irssi-bd8712dde1b4d9ad2ee261811bf41163e28f02cd.zip |
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
-rw-r--r-- | src/core/servers-reconnect.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/fe-recode.c | 2 | ||||
-rw-r--r-- | src/irc/notifylist/notify-commands.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c index a1856546..5f53368c 100644 --- a/src/core/servers-reconnect.c +++ b/src/core/servers-reconnect.c @@ -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) diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index 66e9f0fc..d2f48f20 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -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 */ diff --git a/src/fe-common/core/fe-recode.c b/src/fe-common/core/fe-recode.c index e9427c43..f68dff17 100644 --- a/src/fe-common/core/fe-recode.c +++ b/src/fe-common/core/fe-recode.c @@ -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; diff --git a/src/irc/notifylist/notify-commands.c b/src/irc/notifylist/notify-commands.c index 94a6ead1..ea85329a 100644 --- a/src/irc/notifylist/notify-commands.c +++ b/src/irc/notifylist/notify-commands.c @@ -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; |