From: cloudwalk Date: Tue, 30 Jun 2020 19:21:50 +0000 (+0000) Subject: Reset tempstringsbuf when progs are reset. Fixes possible memory leak in CSQC(?) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b808f7f4f5e1e5c8e3d92871b6ee81bb25f673f9;p=xonotic%2Fdarkplaces.git Reset tempstringsbuf when progs are reset. Fixes possible memory leak in CSQC(?) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12765 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/prvm_edict.c b/prvm_edict.c index 2720c2b9..9a14bef9 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -1858,6 +1858,9 @@ void PRVM_Prog_Reset(prvm_prog_t *prog) { if (prog->loaded) { + if(prog->tempstringsbuf.cursize) + Mem_Free(prog->tempstringsbuf.data); + prog->tempstringsbuf.cursize = 0; PRVM_LeakTest(prog); prog->reset_cmd(prog); Mem_FreePool(&prog->progs_mempool);