diff --git a/cgit.h b/cgit.h index f06a941..02cc26a 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 4574120..b576df8 100644 --- a/shared.c +++ b/shared.c @@ -88,3 +88,13 @@ void cgit_querystring_cb(const char *name, const char *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 b441e14..f654208 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -61,8 +61,5 @@ void cgit_print_commit(const char *hex) html("