summaryrefslogtreecommitdiff
path: root/list-objects.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2007-11-12 00:14:15 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-12 00:14:15 -0800
commit35865ca24500a0d46a012f7a55f39bf36389f7ba (patch)
tree9ffdddf391bc8de021d60c7c9b631c1882b1bf2c /list-objects.c
parentMerge branch 'js/upload-pack' (diff)
parentMerge branch 'sp/maint-plug-traverse-commit-list-leak' into maint (diff)
downloadtgif-35865ca24500a0d46a012f7a55f39bf36389f7ba.tar.xz
Merge branch 'maint'
* maint: for-each-ref: fix off by one read. git-branch: remove mention of non-existent '-b' option git-svn: prevent dcommitting if the index is dirty. Fix memory leak in traverse_commit_list
Diffstat (limited to 'list-objects.c')
-rw-r--r--list-objects.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/list-objects.c b/list-objects.c
index e5c88c278f..4ef58e7ec0 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -170,4 +170,11 @@ void traverse_commit_list(struct rev_info *revs,
}
for (i = 0; i < objects.nr; i++)
show_object(&objects.objects[i]);
+ free(objects.objects);
+ if (revs->pending.nr) {
+ free(revs->pending.objects);
+ revs->pending.nr = 0;
+ revs->pending.alloc = 0;
+ revs->pending.objects = NULL;
+ }
}