Signed-off-by: Andy Green <a...@warmcat.com>
---
 ui-blame.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ui-blame.c b/ui-blame.c
index daa7e2b..6e23f0b 100644
--- a/ui-blame.c
+++ b/ui-blame.c
@@ -154,7 +154,7 @@ static void print_object(const struct object_id *oid, 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");
@@ -206,6 +206,7 @@ static void print_object(const struct object_id *oid, const 
char *path,
        } else {
                html_txt(buf);
        }
+
        html("</code></pre>");
 
        html("</div></td>\n");
@@ -213,6 +214,9 @@ static void print_object(const struct object_id *oid, const 
char *path,
        html("</tr>\n</table>\n");
 
        cgit_print_layout_end();
+
+cleanup:
+       free(buf);
 }
 
 static int walk_tree(const struct object_id *oid, struct strbuf *base,

_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to