logo

checksrc

Check directory for potential non-source files git clone https://anongit.hacktivis.me/git/checksrc.git
commit: 869a094897a90735052749b2a7509a1c03052840
parent a5a707d6013a7dc8baae1378e3cd652d44164236
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 24 Sep 2025 06:25:37 +0200

checkfile: make sure to close before returning

Diffstat:

Mchecksrc.c2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/checksrc.c b/checksrc.c @@ -102,6 +102,7 @@ checkfile(const char *fname) if(++dumps == 3) { printf("%s: Found 3 dumps, stopping there\n", fname); + close(fd); return 1; } } @@ -115,6 +116,7 @@ checkfile(const char *fname) if(buf[i] < ' ') { printf("%s: binary (byte 0x%X found at position 0x%zX)\n", fname, buf[i], i); + close(fd); return 1; }