From 13019d413647c4fbd3bb1564bbdf0d934c0a74d7 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 4 May 2005 21:44:15 +0400 Subject: [PATCH] Fix memory leaks in git-fsck-cache This patch fixes memory leaks in parse_object() and related functions; these leaks were very noticeable when running git-fsck-cache. Signed-off-by: Sergey Vlasov Signed-off-by: Linus Torvalds --- blob.c | 1 + 1 file changed, 1 insertion(+) (limited to 'blob.c') diff --git a/blob.c b/blob.c index d4af4a3094..625db43971 100644 --- a/blob.c +++ b/blob.c @@ -34,6 +34,7 @@ int parse_blob(struct blob *item) if (!buffer) return error("Could not read %s", sha1_to_hex(item->object.sha1)); + free(buffer); if (strcmp(type, blob_type)) return error("Object %s not a blob", sha1_to_hex(item->object.sha1)); -- cgit v1.2.3