Author: Lars Hjemli <hjemli@gmail.com>
Add cgit_free_commitinfo() and use where needed Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit.h | 2 ++ shared.c | 10 ++++++++++ ui-commit.c | 5 +---- ui-log.c | 5 +---- ui-summary.c | 1 +
diff --git a/cgit.h b/cgit.h index f06a941d7ac1e01f6252ef29482ab1c5f3b24241..02cc26a4a4e698af4473572cb3ed0278e382e446 100644 --- a/cgit.h +++ b/cgit.h @@ -65,6 +65,8 @@ extern void cgit_global_config_cb(const char *name, const char *value); 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); diff --git a/shared.c b/shared.c index 4574120cafa5c6900741dc0fbe83325d3f89eb72..b576df8496f3cdbc1767ae68b858ccf753896521 100644 --- a/shared.c +++ b/shared.c @@ -88,3 +88,13 @@ cgit_query_ofs = atoi(value); } } +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; +} diff --git a/ui-commit.c b/ui-commit.c index b441e143b3ac1daec60b3b416b14610aef82785e..f654208e187e5212c26826d943c3732682e098f9 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -61,8 +61,5 @@ html("