diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-05-19 06:13:41 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-05-19 06:13:41 +0000 |
commit | 16d9962cbb890ca2a273143ec143e32476d0803a (patch) | |
tree | c4ff3c3e8c2d3fbc78eced898b67521c3fe17657 | |
parent | 6f3781161611e0d2e550d6b87c6445a684fa59b1 (diff) |
Fixing malloc statement. This wasn't a problem as it allocated more
memory than it needed, but it was still wrong.
Thanks for pointing it out Erik.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1673 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | src/main/Groups.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/Groups.c b/src/main/Groups.c index 86431704..13dc973b 100644 --- a/src/main/Groups.c +++ b/src/main/Groups.c @@ -388,8 +388,8 @@ static cGroupDefinition *CCTKi_SetupGroup(const char *implementation, int group_num; char *fullname1; - fullname1 = (char *) malloc( (strlen(implementation)+strlen(name)+2) - *sizeof(const char *)); + fullname1 = (char *) malloc( (strlen(implementation)+strlen(name)+3) + *sizeof(char)); sprintf(fullname1,"%s::%s",implementation,name); if((group_num = CCTK_GroupIndex(fullname1)) == -1) |