Browse Source

engine: server: fix memleak after previous commit

pull/2/head
Alibek Omarov 4 years ago
parent
commit
49a20a9ac5
  1. 8
      engine/server/sv_game.c

8
engine/server/sv_game.c

@ -4787,7 +4787,15 @@ qboolean SV_ParseEdict( char **pfile, edict_t *ent )
} }
if( classname == NULL ) if( classname == NULL )
{
// release allocated strings
for( i = 0; i < numpairs; i++ )
{
Mem_Free( pkvd[i].szKeyName );
Mem_Free( pkvd[i].szValue );
}
return false; return false;
}
ent = SV_AllocPrivateData( ent, ALLOC_STRING( classname )); ent = SV_AllocPrivateData( ent, ALLOC_STRING( classname ));

Loading…
Cancel
Save