fix memory leaks found with valgrind

This commit is contained in:
Josh Coalson
2002-12-04 07:01:37 +00:00
parent 44ca9fedaa
commit 4fa90599fe
7 changed files with 41 additions and 12 deletions

View File

@@ -294,8 +294,13 @@ void free_options(CommandLineOptions *options)
if(0 != options->args.arguments)
free(options->args.arguments);
if(0 != options->filenames)
if(0 != options->filenames) {
for(i = 0; i < options->num_files; i++) {
if(0 != options->filenames[i])
free(options->filenames[i]);
}
free(options->filenames);
}
}
/*