From 09e12917f011664ec246ae3c7bdaf6036564a32b Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 5 Dec 2014 20:02:19 +0000 Subject: [PATCH] gamevars.c: don't leak memory in Gv_NewArray(). DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4793 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamevars.c | 1 + 1 file changed, 1 insertion(+) diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index acd0a76f4..b4a7c349d 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -424,6 +424,7 @@ int32_t Gv_NewArray(const char *pszLabel, void *arrayptr, intptr_t asize, uint32 if (!(dwFlags & GAMEARRAY_TYPE_MASK)) { + Baligned_free(aGameArrays[i].plValues); aGameArrays[i].plValues = (intptr_t *)Xaligned_alloc(ACTOR_VAR_ALIGNMENT, asize * GAR_ELTSZ); Bmemset(aGameArrays[i].plValues, 0, asize * GAR_ELTSZ); }