From ff9d331db494d323bb89a8fe67b96d90b7e60030 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 14 Oct 2017 19:50:53 -0400 Subject: acme: free buf in checksha1 Thanks to Lorenzo Beretta for noticing. --- src/cmd/acme/exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c index 75737d80..1df01c71 100644 --- a/src/cmd/acme/exec.c +++ b/src/cmd/acme/exec.c @@ -651,6 +651,7 @@ checksha1(char *name, File *f, Dir *d) buf = emalloc(8192); while((n = read(fd, buf, 8192)) > 0) sha1(buf, n, nil, h); + free(buf); close(fd); sha1(nil, 0, out, h); if(memcmp(out, f->sha1, sizeof out) == 0) { -- cgit v1.2.3