diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-01-22 19:11:20 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-22 19:11:20 +0100 |
commit | 745e4e3c83b1688d205d5a9a54ef41fbb62efce4 (patch) | |
tree | 5a82cec65eeb949e72197c652a22272de17615bd /src/grab.c | |
parent | 0ac2fd6a3c27e046340efe61beb5137953b6930a (diff) |
Fix memory leaks
Diffstat (limited to 'src/grab.c')
-rw-r--r-- | src/grab.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -224,6 +224,7 @@ main(int argc, char **argv) } if (ferror(flist)) warn("getdelim"); + fclose(flist); #else if (argc == 1) grab(ops, stdin, "-"); @@ -244,6 +245,9 @@ main(int argc, char **argv) #endif #ifdef GRAB_DEBUG +# if GIT_GRAB + free(entry); +# endif for (size_t i = 0; i < ops.len; i++) regfree(&ops.buf[i].pat); free(ops.buf); @@ -639,6 +643,7 @@ putm(struct sv sv, struct matches *ms, const char *filename) if (!(sflag && sv.p[sv.len - 1] == '\n')) putchar(zflag ? '\0' : '\n'); + free(valid.buf); } void |