diff options
author | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-09 16:11:33 +0200 |
---|---|---|
committer | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-09 16:11:33 +0200 |
commit | bdf938c57947d37cc19870dc80c9a22a8b653f5e (patch) | |
tree | 473301b51870d8817ce9ae0282bf15b7e16716a8 /src | |
parent | e97a7b59139232bc44101c0ea7815ceb100be9de (diff) |
grijp: fix leak
Diffstat (limited to 'src')
-rw-r--r-- | src/grijp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grijp.c b/src/grijp.c index 79b0d11..0884be6 100644 --- a/src/grijp.c +++ b/src/grijp.c @@ -197,12 +197,12 @@ int entry_grijp(int argc, char **argv) { int res = 0; if (fixed) { res = loop_args(args, process); - for (size_t i = 0; i < npat; i++) free(patterns[i]); } else { compile_regexps(); res = loop_args(args, process); for (size_t i = 0; i < npat; i++) regfree(patterns[i]); } + for (size_t i = 0; i < npat; i++) free(patterns[i]); free(patterns); return res; } |