]> 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 7e58737f8a36d23005c4ecdd868ff8539d875233..295a4c7b00923c1c2d31594ff8f737bad82ba4b6 100644 (file)
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -63,11 +63,11 @@ static int print_branch(struct refinfo *ref)
                return 1;
        html("<tr><td>");
        cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0, NULL, NULL,
-                     ctx.qry.showmsg);
+                     ctx.qry.showmsg, 0);
        html("</td><td>");
 
        if (ref->object->type == OBJ_COMMIT) {
-               cgit_commit_link(info->subject, NULL, NULL, name, NULL, NULL, 0);
+               cgit_commit_link(info->subject, NULL, NULL, name, NULL, NULL);
                html("</td><td>");
                cgit_open_filter(ctx.repo->email_filter, info->author_email, "refs");
                html_txt(info->author);
@@ -82,7 +82,7 @@ static int print_branch(struct refinfo *ref)
        return 0;
 }
 
-static void print_tag_header()
+static void print_tag_header(void)
 {
        html("<tr class='nohover'><th class='left'>Tag</th>"
             "<th class='left'>Download</th>"
@@ -135,12 +135,12 @@ static int print_tag(struct refinfo *ref)
                tag = (struct tag *)obj;
                obj = tag->tagged;
                info = ref->tag;
-               if (!tag || !info)
+               if (!info)
                        return 1;
        }
 
        html("<tr><td>");
-       cgit_tag_link(name, NULL, NULL, ctx.qry.head, name);
+       cgit_tag_link(name, NULL, NULL, name);
        html("</td><td>");
        if (ctx.repo->snapshots && (obj->type == OBJ_COMMIT))
                print_tag_downloads(ctx.repo, name);
@@ -234,9 +234,9 @@ void cgit_print_tags(int maxcount)
        cgit_free_reflist_inner(&list);
 }
 
-void cgit_print_refs()
+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()
                cgit_print_tags(0);
        }
        html("</table>");
+       cgit_print_layout_end();
 }