From 383f85b72a41279f69a3a569420615761491b8a2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 7 May 2005 01:27:00 -0700 Subject: [PATCH] Free compressed buffer after write_sha1_file() is done. This does not matter for commands that write just a handful SHA1 files, but is noticeable in git-convert-cache which essentially traverses the entire object database. Signed-off-by: Junio C Hamano --- sha1_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sha1_file.c b/sha1_file.c index bd68783a4..ee62eee20 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -425,6 +425,7 @@ int write_sha1_file(char *buf, unsigned long len, const char *type, unsigned cha die("unable to write file"); fchmod(fd, 0444); close(fd); + free(compressed); ret = link(tmpfile, filename); if (ret < 0) { -- 2.26.2