]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-refs.c
ui-repolist: fix resource leak: free allocation from cgit_currenturl
[cgit.git] / ui-refs.c
index 73a187be5b0c502facefced6720d26d3e1601eb2..295a4c7b00923c1c2d31594ff8f737bad82ba4b6 100644 (file)
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -135,7 +135,7 @@ static int print_tag(struct refinfo *ref)
                tag = (struct tag *)obj;
                obj = tag->tagged;
                info = ref->tag;
-               if (!tag || !info)
+               if (!info)
                        return 1;
        }
 
@@ -236,7 +236,7 @@ void cgit_print_tags(int maxcount)
 
 void cgit_print_refs(void)
 {
-
+       cgit_print_layout_start();
        html("<table class='list nowrap'>");
 
        if (ctx.qry.path && starts_with(ctx.qry.path, "heads"))
@@ -249,4 +249,5 @@ void cgit_print_refs(void)
                cgit_print_tags(0);
        }
        html("</table>");
+       cgit_print_layout_end();
 }