diff options
author | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-07 23:04:04 +0200 |
---|---|---|
committer | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-07 23:04:04 +0200 |
commit | bceb61b88979dc8fa0d4468354ce55cca833fc49 (patch) | |
tree | 5060938243ffd7778c88472d1bb1d20e0bac58c2 | |
parent | a0962d7311c057229a25ae5f30fc3e9645d6ff24 (diff) |
grijp: close streams
-rw-r--r-- | src/grijp.c | 2 |
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; } |