From 57a44a9738308d73ada759b5663c84dc0f535256 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 13 Jul 2012 18:52:35 +0200 Subject: More memory leaks and exit paths --- src/indexamajig.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/indexamajig.c b/src/indexamajig.c index f560b7b8..b8e57048 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -428,8 +428,6 @@ static void run_work(const struct index_args *iargs, fh = fdopen(filename_pipe, "r"); if ( fh == NULL ) { ERROR("Failed to fdopen() the filename pipe!\n"); - close(filename_pipe); - close(results_pipe); return; } @@ -450,7 +448,7 @@ static void run_work(const struct index_args *iargs, continue; } else { ERROR("Read error!\n"); - return; + break; } } @@ -482,7 +480,6 @@ static void run_work(const struct index_args *iargs, /* close my pipes */ fclose(fh); - close(results_pipe); cleanup_indexing(iargs->ipriv); free(iargs->indm); @@ -1034,6 +1031,7 @@ int main(int argc, char *argv[]) ERROR("Invalid parameters for '--int-radius'\n"); return 1; } + free(intrad); } else { STATUS("WARNING: You did not specify --int-radius.\n"); STATUS("WARNING: I will use the default values, which are" @@ -1272,16 +1270,16 @@ int main(int argc, char *argv[]) for ( j=0; j