acme: free buf in checksha1

Thanks to Lorenzo Beretta for noticing.
This commit is contained in:
Russ Cox 2017-10-14 19:50:53 -04:00
parent e4d6099eff
commit ff9d331db4

View file

@ -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) {