the repository which powers this website
-rw-r--r--themed/base.html4
-rw-r--r--themed/log.html3
-rw-r--r--themed/summary.html1
-rw-r--r--themed/tree.html3
4 files changed, 9 insertions, 2 deletions
diff --git a/themed/base.html b/themed/base.html
index ecf79967..3ecef0b9 100644
--- a/themed/base.html
+++ b/themed/base.html
@@ -163,11 +163,13 @@
// Process the commit
num_commits++;
- // ?? This causes subsequent walks to return commits with index 0
+ // This causes subsequent walks to return commits with index 0 - unsure why
+ // Checked with Valgrind - commenting this out seems not to leak memory
//release_commit_memory(the_repository->parsed_objects, commit);
//commit->parents = NULL;
}
reset_revision_walk();
+ release_revisions(&rev);
return num_commits;
}
diff --git a/themed/log.html b/themed/log.html
index 245e458b..d47436bf 100644
--- a/themed/log.html
+++ b/themed/log.html
@@ -50,8 +50,9 @@
{! release_commit_memory(the_repository->parsed_objects, commit); !}
{! commit->parents = NULL; !}
{% endwhile %}
- {! reset_revision_walk(); !}
</div>
+ {! reset_revision_walk(); !}
+ {! release_revisions(&rev); !}
</main>
{! page_end(); !}
{% endpage %}
diff --git a/themed/summary.html b/themed/summary.html
index 4a3ca3f2..c22248eb 100644
--- a/themed/summary.html
+++ b/themed/summary.html
@@ -66,6 +66,7 @@
{! cgit_print_age(info->committer_date, info->committer_tz, TM_WEEK * 2); !} ago
</span>
</div>
+ {! cgit_free_commitinfo(info); !}
{# Files #}
{!
const struct object_id *tree_oid = get_commit_tree_oid(commit);
diff --git a/themed/tree.html b/themed/tree.html
index f1a6a834..2bf73784 100644
--- a/themed/tree.html
+++ b/themed/tree.html
@@ -85,6 +85,7 @@
} else {
cgit_tree_print_text_buffer(basename, buf, size);
}
+ free(buf);
!}
</div>
{% endif %}
@@ -110,6 +111,7 @@
strbuf_addstr(&buffer, pathname);
if (strcmp(walk_tree_ctx->match_path, buffer.buf)) {
// Not the target path, so continue to walk the tree
+ strbuf_release(&buffer);
return READ_TREE_RECURSIVE;
}
@@ -141,6 +143,7 @@
tree_content_directory_item(oid, base, pathname, mode, walk_tree_ctx->directory_child_idx);
walk_tree_ctx->directory_child_idx++;
}
+ strbuf_release(&buffer);
return 0;
}