Fix memory leak in _handle_topic_command() when returning without calling irc_unget_listelems() on variable 'e'
This commit is contained in:
parent
71afce3904
commit
6870226159
1 changed files with 6 additions and 1 deletions
|
@ -1444,10 +1444,15 @@ namespace pvpgn
|
|||
std::snprintf(temp, sizeof(temp), "%s :You're not on that channel", e[0]);
|
||||
irc_send(conn, ERR_NOTONCHANNEL, temp);
|
||||
}
|
||||
irc_unget_listelems(e);
|
||||
}
|
||||
else
|
||||
irc_send(conn, ERR_NEEDMOREPARAMS, "TOPIC :Not enough parameters");
|
||||
|
||||
if (e)
|
||||
{
|
||||
irc_unget_listelems(e);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue