From mboxrd@z Thu Jan 1 00:00:00 1970 From: list at eworm.de (Christian Hesse) Date: Fri, 7 Oct 2016 15:35:26 +0200 Subject: [PATCH 1/1] ui-log: fix data corruption Message-ID: <20161007133526.2931-1-list@eworm.de> From: Christian Hesse This data is allocated in a bigger context. So we should not free it here to prevent data corruption. Signed-off-by: Christian Hesse --- ui-log.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ui-log.c b/ui-log.c index a31ff7c..cba91af 100644 --- a/ui-log.c +++ b/ui-log.c @@ -484,9 +484,6 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) { if (show_commit(commit, &rev)) i++; - free_commit_buffer(commit); - free_commit_list(commit->parents); - commit->parents = NULL; } for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; /* nop */) { @@ -506,9 +503,6 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern i++; print_commit(commit, &rev); } - free_commit_buffer(commit); - free_commit_list(commit->parents); - commit->parents = NULL; } if (pager) { html("