summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-10-07 15:32:47 +0200
committerChristian Hesse <mail@eworm.de>2016-10-07 15:32:47 +0200
commit06d421040492a8804d7bbab74361d69e2ededb65 (patch)
treeeb2eb57fda9fd763d8c25c08ded78677fd73fd76
parentef3108656b9c6e22604c18bd9d05bdc847d81e87 (diff)
downloadcgit-06d421040492a8804d7bbab74361d69e2ededb65.tar.gz
ui-log: fix data corruption
This data is allocated in a bigger context. So we should not free it here to prevent data corruption.
-rw-r--r--ui-log.c6
1 files changed, 0 insertions, 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("</table><ul class='pager'>");