tacme: free buf in checksha1 - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit ff9d331db494d323bb89a8fe67b96d90b7e60030 (DIR) parent e4d6099eff8d04d96fd4937bc97631abc5218fcd (HTM) Author: Russ Cox <rsc@swtch.com> Date: Sat, 14 Oct 2017 19:50:53 -0400 acme: free buf in checksha1 Thanks to Lorenzo Beretta for noticing. Diffstat: M src/cmd/acme/exec.c | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) --- (DIR) diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c t@@ -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) {