diff options
author | goodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 1999-10-26 23:45:00 +0000 |
---|---|---|
committer | goodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 1999-10-26 23:45:00 +0000 |
commit | 71ba3eee78093646432d1abfa389fbbbfeb9e189 (patch) | |
tree | a2ed003063bfa407e31631c5c6e1ee343ee4f86a /src/SetupPGH.c | |
parent | 4392870df8c8cce741e4135b3ce53f0a1af9530a (diff) |
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
Diffstat (limited to 'src/SetupPGH.c')
-rw-r--r-- | src/SetupPGH.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); } |