From f875d252d2637bb850f8c4d5d0153c1f29ede3aa Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 4 Sep 2019 14:57:56 +0200 Subject: [PATCH] fix crash in join due to incorrect free --- src/irc/core/massjoin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/irc/core/massjoin.c b/src/irc/core/massjoin.c index be406d3d..2405f947 100644 --- a/src/irc/core/massjoin.c +++ b/src/irc/core/massjoin.c @@ -54,8 +54,10 @@ static void event_join(IRC_SERVER_REC *server, const char *data, /* find channel */ chanrec = irc_channel_find(server, channel); - g_free(params); - if (chanrec == NULL) return; + if (chanrec == NULL) { + g_free(params); + return; + } /* check that the nick isn't already in nicklist. seems to happen sometimes (server desyncs or something?) */ @@ -103,6 +105,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, } chanrec->massjoins++; + g_free(params); } static void event_chghost(IRC_SERVER_REC *server, const char *data,