From 71ba3eee78093646432d1abfa389fbbbfeb9e189 Mon Sep 17 00:00:00 2001 From: goodale Date: Tue, 26 Oct 1999 23:45:00 +0000 Subject: Various things pointed out by running Insure on the code. Normally harmless things like not returning a value, but a rather subtle memory leak in one place too. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@120 b61c5cb5-eaca-4651-9a7a-d64986f99364 --- src/SetupPGH.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/SetupPGH.c') diff --git a/src/SetupPGH.c b/src/SetupPGH.c index a484984..35035ef 100644 --- a/src/SetupPGH.c +++ b/src/SetupPGH.c @@ -255,6 +255,7 @@ void pGH_SetupBasics(pGH *GH, GH->convlevel = 0; GH->forceSync = 0; + free(nproc); } @@ -269,10 +270,12 @@ void pGH_SetupBounds(pGH *GH,int dim, int *nsize) int *iend; int *nproc; int staggertype; - + +#if 0 dirs = (int *)malloc(dim*sizeof(int)); istart = (int *)malloc(dim*sizeof(int)); iend = (int *)malloc(dim*sizeof(int)); +#endif staggertype = GH->stagger; @@ -371,6 +374,7 @@ void pGH_SetupBounds(pGH *GH,int dim, int *nsize) return; } + free(step); /* BAM ELLIPTIC CHANGED THINGS HERE */ @@ -711,6 +715,9 @@ void pGH_SetupOwnership(pGH *GH,int dim) { } #endif + free(nproc); + free(istart); + free(iend); } -- cgit v1.2.3