Fix a memory leak.

Entity/Edict leafs weren't being freed when the entity was freed.
This commit is contained in:
Bill Currie 2012-07-01 08:15:54 +09:00
parent 7573c38122
commit 3d56084f59
1 changed files with 1 additions and 0 deletions

View File

@ -348,6 +348,7 @@ link_t **sv_link_prev;
void
SV_UnlinkEdict (edict_t *ent)
{
free_edict_leafs (&SVdata (ent)->leafs);
if (!SVdata (ent)->area.prev)
return; // not linked in anywhere
RemoveLink (&SVdata (ent)->area);