summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-07 08:27:00 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-05-07 08:27:00 (GMT)
commit383f85b72a41279f69a3a569420615761491b8a2 (patch)
tree211e0e6e95f2ac5260ebe2108b2f812def1d56a8 /sha1_file.c
parent651df67bbc41e8d0cb84f35aa541542bd6806825 (diff)
downloadgit-383f85b72a41279f69a3a569420615761491b8a2.zip
git-383f85b72a41279f69a3a569420615761491b8a2.tar.gz
git-383f85b72a41279f69a3a569420615761491b8a2.tar.bz2
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 <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index bd68783..ee62eee 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) {