Fix memory leak in _client_friendslistreq() when returning without calling packet_del_ref() on rpacket
This commit is contained in:
parent
89aa3ad327
commit
603657f3e2
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue