fix crash in join due to incorrect free

This commit is contained in:
ailin-nemui 2019-09-04 14:57:56 +02:00
parent 3642dbad97
commit f875d252d2

View File

@ -54,8 +54,10 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
/* find channel */
chanrec = irc_channel_find(server, channel);
if (chanrec == NULL) {
g_free(params);
if (chanrec == NULL) return;
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,