diff options
| -rw-r--r-- | ui-tag.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -44,8 +44,6 @@ void cgit_print_tag(char *revname) | |||
| 44 | struct strbuf fullref = STRBUF_INIT; | 44 | struct strbuf fullref = STRBUF_INIT; |
| 45 | unsigned char sha1[20]; | 45 | unsigned char sha1[20]; |
| 46 | struct object *obj; | 46 | struct object *obj; |
| 47 | struct tag *tag; | ||
| 48 | struct taginfo *info; | ||
| 49 | 47 | ||
| 50 | if (!revname) | 48 | if (!revname) |
| 51 | revname = ctx.qry.head; | 49 | revname = ctx.qry.head; |
| @@ -63,6 +61,9 @@ void cgit_print_tag(char *revname) | |||
| 63 | goto cleanup; | 61 | goto cleanup; |
| 64 | } | 62 | } |
| 65 | if (obj->type == OBJ_TAG) { | 63 | if (obj->type == OBJ_TAG) { |
| 64 | struct tag *tag; | ||
| 65 | struct taginfo *info; | ||
| 66 | |||
| 66 | tag = lookup_tag(sha1); | 67 | tag = lookup_tag(sha1); |
| 67 | if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) { | 68 | if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) { |
| 68 | cgit_print_error_page(500, "Internal server error", | 69 | cgit_print_error_page(500, "Internal server error", |
| @@ -99,6 +100,7 @@ void cgit_print_tag(char *revname) | |||
| 99 | html("</table>\n"); | 100 | html("</table>\n"); |
| 100 | print_tag_content(info->msg); | 101 | print_tag_content(info->msg); |
| 101 | cgit_print_layout_end(); | 102 | cgit_print_layout_end(); |
| 103 | cgit_free_taginfo(info); | ||
| 102 | } else { | 104 | } else { |
| 103 | cgit_print_layout_start(); | 105 | cgit_print_layout_start(); |
| 104 | html("<table class='commit-info'>\n"); | 106 | html("<table class='commit-info'>\n"); |
