summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-channels.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2017-11-11 12:37:51 +0100
committerLemonBoy <thatlemon@gmail.com>2017-11-11 12:37:51 +0100
commit7605f67f95b6ee1ac26dd8fb7f3121f319497943 (patch)
tree784a50609106abfdda644b96f31c44438a26da6f /src/fe-common/core/fe-channels.c
parent7e619ed990503faf45fc1ae1e28a3a6062dc7532 (diff)
downloadirssi-7605f67f95b6ee1ac26dd8fb7f3121f319497943.zip
Prevent a UAF error during the execution of some commands
Some arguments were free'd first and then printed, leading to gibberish being output to screen or a crash. Found by Joseph Bisch. Closes: !GL17
Diffstat (limited to 'src/fe-common/core/fe-channels.c')
-rw-r--r--src/fe-common/core/fe-channels.c2
1 files changed, 1 insertions, 1 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;
}