[PATCH 07/11] ui-blame: free read_sha1_file() buffer after use

Andy Green andy at warmcat.com
Wed Jun 13 04:02:05 CEST 2018


Signed-off-by: Andy Green <andy at warmcat.com>
---
 ui-blame.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui-blame.c b/ui-blame.c
index 17e2d60..a5c7d69 100644
--- a/ui-blame.c
+++ b/ui-blame.c
@@ -206,6 +206,9 @@ static void print_object(const unsigned char *sha1, const char *path,
 	} else {
 		html_txt(buf);
 	}
+
+	free(buf);
+
 	html("</code></pre>");
 
 	html("</div></td>\n");



More information about the CGit mailing list