Fix memory leak in _client_friendslistreq() when returning without calling packet_del_ref() on rpacket

This commit is contained in:
RElesgoe 2016-08-23 19:34:00 -07:00
parent 89aa3ad327
commit 603657f3e2

View file

@ -2255,7 +2255,10 @@ namespace pvpgn
packet_set_type(rpacket, SERVER_FRIENDSLISTREPLY);
if ((flist = account_get_friends(account)) == NULL)
{
packet_del_ref(rpacket);
return -1;
}
for (i = 0; i < n; i++) {
frienduid = account_get_friend(account, i);