From 979412ba730ae59aa12b6dc9a8ccb4af23f2a08d Mon Sep 17 00:00:00 2001 From: Zac Stewart Date: Mon, 8 Jun 2020 19:28:56 -0400 Subject: [PATCH] Close files when done reading them --- tools/blkpack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/blkpack.c b/tools/blkpack.c index ec3ad72..9db0ed2 100644 --- a/tools/blkpack.c +++ b/tools/blkpack.c @@ -61,6 +61,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "blk %s has more than 16 lines\n", ep->d_name); } free(line); + fclose(fp); } fwrite(buf, 1024, blkcnt, stdout); free(buf);