summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorNei <ailin.nemui@gmail.com>2018-01-03 10:35:58 +0000
committerNei <ailin.nemui@gmail.com>2018-01-03 10:35:58 +0000
commite405330e04dc344797f00c12cf8fd7f63b17e0e4 (patch)
treeccfd879de4070d1b28fbcf5e6bcee9a4785c0588 /src/fe-common
parent48e909dde758efe19d4cd707b742370a042d0559 (diff)
parent7605f67f95b6ee1ac26dd8fb7f3121f319497943 (diff)
downloadirssi-e405330e04dc344797f00c12cf8fd7f63b17e0e4.zip
Merge branch 'uaf-modify' into 'master'
Prevent a UAF error during the execution of some commands See merge request irssi/irssi!24
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/fe-channels.c2
-rw-r--r--src/fe-common/core/fe-server.c2
-rw-r--r--src/fe-common/irc/fe-ircnet.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c
index 8e434ab5..5cad51a7 100644
--- a/src/fe-common/core/fe-channels.c
+++ b/src/fe-common/core/fe-channels.c
@@ -278,9 +278,9 @@ static void cmd_channel_add_modify(const char *data, gboolean add)
rec = channel_setup_find(channel, chatnet);
if (rec == NULL) {
if (add == FALSE) {
- cmd_params_free(free_arg);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_CHANSETUP_NOT_FOUND, channel, chatnet);
+ cmd_params_free(free_arg);
return;
}
diff --git a/src/fe-common/core/fe-server.c b/src/fe-common/core/fe-server.c
index 810afe83..074a83f3 100644
--- a/src/fe-common/core/fe-server.c
+++ b/src/fe-common/core/fe-server.c
@@ -136,9 +136,9 @@ static void cmd_server_add_modify(const char *data, gboolean add)
if (rec == NULL) {
if (add == FALSE) {
- cmd_params_free(free_arg);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_SETUPSERVER_NOT_FOUND, addr, port);
+ cmd_params_free(free_arg);
return;
}
diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c
index 8f1d2efd..5ae5ac05 100644
--- a/src/fe-common/irc/fe-ircnet.c
+++ b/src/fe-common/irc/fe-ircnet.c
@@ -106,9 +106,9 @@ static void cmd_network_add_modify(const char *data, gboolean add)
rec = ircnet_find(name);
if (rec == NULL) {
if (add == FALSE) {
- cmd_params_free(free_arg);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
IRCTXT_NETWORK_NOT_FOUND, name);
+ cmd_params_free(free_arg);
return;
}