engine: server: fix memleak after previous commit
This commit is contained in:
parent
8966172ce0
commit
49a20a9ac5
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue