From: Christian Hesse <[email protected]>

This data is allocated in a bigger context. So we should not free it
here to prevent data corruption.

Signed-off-by: Christian Hesse <[email protected]>
---
 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("</table><ul class='pager'>");
-- 
2.10.0

_______________________________________________
CGit mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to