Fix one minor leak.

This commit is contained in:
Con Kolivas 2011-03-16 13:29:47 +11:00
parent 57944b1d5c
commit f758773cd0

8
main.c
View file

@ -315,7 +315,7 @@ static void read_config( struct rzip_control *control )
} }
} }
if (fp == NULL) if (fp == NULL)
return; goto out;
/* if we get here, we have a file. read until no more. */ /* if we get here, we have a file. read until no more. */
@ -422,13 +422,13 @@ static void read_config( struct rzip_control *control )
parameter, parametervalue); parameter, parametervalue);
} }
if (unlikely(fclose(fp)))
fatal("Failed to fclose fp in read_config\n");
out:
/* clean up */ /* clean up */
free(line); free(line);
free(homeconf); free(homeconf);
if (unlikely(fclose(fp)))
fatal("Failed to fclose fp in read_config\n");
/* fprintf(stderr, "\nWindow = %d \ /* fprintf(stderr, "\nWindow = %d \
\nCompression Level = %d \ \nCompression Level = %d \
\nThreshold = %1.2f \ \nThreshold = %1.2f \