summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Xu <dxu@dxuuu.xyz>2022-04-10 17:36:19 -0700
committerQuentin Carbonneaux <quentin@c9x.me>2022-04-11 14:39:01 +0200
commit3c5cd9fdd099dc13e75383fef302e3ef610b439d (patch)
tree3fa23b958661d71f07968f58103e150eeddbc6cb
parent5f4b42abc730186afe19b889b6526bc244b8669d (diff)
downloadroux-3c5cd9fdd099dc13e75383fef302e3ef610b439d.tar.gz
Close input file after done reading
Leaks resources to not close.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index dc76a86..71b01f1 100644
--- a/main.c
+++ b/main.c
@@ -185,6 +185,7 @@ main(int ac, char *av[])
 			}
 		}
 		parse(inf, f, data, func);
+		fclose(inf);
 	} while (++optind < ac);
 
 	if (!dbg) {