summaryrefslogtreecommitdiff
path: root/src/grijp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grijp.c')
-rw-r--r--src/grijp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/grijp.c b/src/grijp.c
index 9767c46..898852c 100644
--- a/src/grijp.c
+++ b/src/grijp.c
@@ -127,6 +127,7 @@ static int process_regex(char *fname, bool isstdin) {
for (size_t i = 0; i < npat; i++) regfree(regexps[i]);
free(regexps);
+ if (!isstdin) fclose(stream);
return 0;
}
@@ -152,6 +153,7 @@ static int process_fixed(char *fname, bool isstdin) {
for (size_t i = 0; i < npat; i++) free(patterns[i]);
free(patterns);
+ if (!isstdin) fclose(stream);
return 0;
}