diff options
| author | Andy Green <andy@warmcat.com> | 2018-06-19 17:02:07 +0800 | 
|---|---|---|
| committer | John Keeping <john@keeping.me.uk> | 2018-06-19 22:45:09 +0100 | 
| commit | b759189574971eabf98aee73b4e4e4c604e21a94 (patch) | |
| tree | 3564b0a33d7d7f5ac8f6ddee2f52ed53a5b1ce29 | |
| parent | ui-tag: Fix inconsistent capitalization (diff) | |
| download | cgit-b759189574971eabf98aee73b4e4e4c604e21a94.tar.gz cgit-b759189574971eabf98aee73b4e4e4c604e21a94.tar.bz2 cgit-b759189574971eabf98aee73b4e4e4c604e21a94.zip | |
ui-blame: free read_sha1_file() buffer after use
Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to '')
| -rw-r--r-- | ui-blame.c | 5 | 
1 files changed, 4 insertions, 1 deletions
| @@ -154,7 +154,7 @@ static void print_object(const unsigned char *sha1, const char *path,  		htmlf("<div class='error'>blob size (%ldKB)"  		      " exceeds display size limit (%dKB).</div>",  		      size / 1024, ctx.cfg.max_blob_size); -		return; +		goto cleanup;  	}  	html("<table class='blame blob'>\n<tr>\n"); @@ -213,6 +213,9 @@ static void print_object(const unsigned char *sha1, const char *path,  	html("</tr>\n</table>\n");  	cgit_print_layout_end(); + +cleanup: +	free(buf);  }  static int walk_tree(const unsigned char *sha1, struct strbuf *base, | 
