aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-10 22:36:16 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-11 18:05:53 -0800
commit94d23673e37160ee99ec1b1cd23ff3b7a79f7226 (patch)
tree9ee168381286822c91a11399afee819f16f7acda /revision.c
parent80dbae03b010b1e5c6e0e4f475578d6cadaadecf (diff)
downloadgit-94d23673e37160ee99ec1b1cd23ff3b7a79f7226.tar.gz
git-94d23673e37160ee99ec1b1cd23ff3b7a79f7226.tar.xz
plug a few leaks in revision walking used in describe.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/revision.c b/revision.c
index 1e3b29a42..f2ddd95e2 100644
--- a/revision.c
+++ b/revision.c
@@ -1121,21 +1121,23 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
void prepare_revision_walk(struct rev_info *revs)
{
int nr = revs->pending.nr;
- struct object_array_entry *list = revs->pending.objects;
+ struct object_array_entry *e, *list;
+ e = list = revs->pending.objects;
revs->pending.nr = 0;
revs->pending.alloc = 0;
revs->pending.objects = NULL;
while (--nr >= 0) {
- struct commit *commit = handle_commit(revs, list->item, list->name);
+ struct commit *commit = handle_commit(revs, e->item, e->name);
if (commit) {
if (!(commit->object.flags & SEEN)) {
commit->object.flags |= SEEN;
insert_by_date(commit, &revs->commits);
}
}
- list++;
+ e++;
}
+ free(list);
if (revs->no_walk)
return;