1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge branch 'uaf-modify' into 'master'

Prevent a UAF error during the execution of some commands

See merge request irssi/irssi!24
This commit is contained in:
Nei 2018-01-03 10:35:58 +00:00
commit e405330e04
3 changed files with 3 additions and 3 deletions

View File

@ -278,9 +278,9 @@ static void cmd_channel_add_modify(const char *data, gboolean add)
rec = channel_setup_find(channel, chatnet); rec = channel_setup_find(channel, chatnet);
if (rec == NULL) { if (rec == NULL) {
if (add == FALSE) { if (add == FALSE) {
cmd_params_free(free_arg);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_CHANSETUP_NOT_FOUND, channel, chatnet); TXT_CHANSETUP_NOT_FOUND, channel, chatnet);
cmd_params_free(free_arg);
return; return;
} }

View File

@ -136,9 +136,9 @@ static void cmd_server_add_modify(const char *data, gboolean add)
if (rec == NULL) { if (rec == NULL) {
if (add == FALSE) { if (add == FALSE) {
cmd_params_free(free_arg);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_SETUPSERVER_NOT_FOUND, addr, port); TXT_SETUPSERVER_NOT_FOUND, addr, port);
cmd_params_free(free_arg);
return; return;
} }

View File

@ -106,9 +106,9 @@ static void cmd_network_add_modify(const char *data, gboolean add)
rec = ircnet_find(name); rec = ircnet_find(name);
if (rec == NULL) { if (rec == NULL) {
if (add == FALSE) { if (add == FALSE) {
cmd_params_free(free_arg);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
IRCTXT_NETWORK_NOT_FOUND, name); IRCTXT_NETWORK_NOT_FOUND, name);
cmd_params_free(free_arg);
return; return;
} }