Skip to content

Commit

Permalink
Don't leak "fin".
Browse files Browse the repository at this point in the history
  • Loading branch information
kristaps committed Oct 13, 2017
1 parent 56e126e commit ac93c99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.c
Expand Up @@ -370,8 +370,6 @@ main(int argc, char *argv[])
opts.arg = (void *)fnin;
if ( ! lowdown_file(&opts, fin, &ret, &retsz, &m, &msz))
err(EXIT_FAILURE, "%s", fnin);
if (fin != stdin)
fclose(fin);
}

if (NULL != extract) {
Expand All @@ -392,6 +390,8 @@ main(int argc, char *argv[])
fclose(fout);
if (NULL != din)
fclose(din);
if (fin != stdin)
fclose(fin);
for (i = 0; i < msz; i++) {
free(m[i].key);
free(m[i].value);
Expand Down

0 comments on commit ac93c99

Please sign in to comment.