diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-02-11 11:38:56 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-02-11 11:38:56 +0000 |
commit | 3e5d44b3eed1d82ec2c193f75a495313df060d7b (patch) | |
tree | 661555619ff314cf60190b103396676890977add /src/util/ParseFile.c | |
parent | c6e0da3f8ec625f05e3b844cc28eb3e41af53534 (diff) |
Fix to CCTK_ParameterFilename, and freeing some memory I'd missed when
the $PARAMETER_FILE directive is used.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2015 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/ParseFile.c')
-rw-r--r-- | src/util/ParseFile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/ParseFile.c b/src/util/ParseFile.c index 7bedba9b..b8ca0e10 100644 --- a/src/util/ParseFile.c +++ b/src/util/ParseFile.c @@ -272,6 +272,7 @@ int ParseFile(FILE *ifp, lpar=((strlen(file)-3)*sizeof(char)); + /* ignore everything else on the line */ while (!(c==' ' || c=='\t' || c == '\n' || c == EOF)) { c = fgetc(ifp); @@ -280,6 +281,8 @@ int ParseFile(FILE *ifp, #endif } strncpy(value,file,lpar); + free(dir); + free(file); value[strlen(value)-1] = '\0'; set_function(tokens,value); } |