Signed-off-by: Lars Hjemli <hjemli@gmail.com>
extern void cgit_repo_config_cb(const char *name, const char *value);
extern void cgit_querystring_cb(const char *name, const char *value);
+extern void *cgit_free_commitinfo(struct commitinfo *info);
+
extern char *fmt(const char *format,...);
extern void html(const char *txt);
}
}
+void *cgit_free_commitinfo(struct commitinfo *info)
+{
+ free(info->author);
+ free(info->author_email);
+ free(info->committer);
+ free(info->committer_email);
+ free(info->subject);
+ free(info);
+ return NULL;
+}
html("<div class='commit-msg'>");
html_txt(info->msg);
html("</div>");
- free(info->author);
- free(info->committer);
- free(info->subject);
- free(info);
+ cgit_free_commitinfo(info);
}
html("</td><td>");
html_txt(info->author);
html("</td></tr>\n");
- free(info->author);
- free(info->committer);
- free(info->subject);
- free(info);
+ cgit_free_commitinfo(info);
}
html("</td><td>");
html_txt(info->author);
html("</td></tr>\n");
+ cgit_free_commitinfo(info);
} else {
html("<tr><td>");
html_txt(buf);