Memory leak fix for event.c. Patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5035 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
f7c684f964
commit
03073c8038
|
@ -667,6 +667,11 @@ void eventRemoveContext(SCRIPT_CONTEXT *psContext)
|
||||||
for(psCChunk = psContext->psGlobals; psCChunk; psCChunk = psNChunk)
|
for(psCChunk = psContext->psGlobals; psCChunk; psCChunk = psNChunk)
|
||||||
{
|
{
|
||||||
psNChunk = psCChunk->psNext;
|
psNChunk = psCChunk->psNext;
|
||||||
|
for(i=0;i < CONTEXT_VALS ; i++)
|
||||||
|
{
|
||||||
|
if(psCChunk->asVals[i].type == VAL_STRING && psCChunk->asVals[i].v.sval)
|
||||||
|
free(psCChunk->asVals[i].v.sval);
|
||||||
|
}
|
||||||
free(psCChunk);
|
free(psCChunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue