diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-12 00:14:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-12 00:14:15 -0800 |
commit | 35865ca24500a0d46a012f7a55f39bf36389f7ba (patch) | |
tree | 9ffdddf391bc8de021d60c7c9b631c1882b1bf2c /list-objects.c | |
parent | Merge branch 'js/upload-pack' (diff) | |
parent | Merge branch 'sp/maint-plug-traverse-commit-list-leak' into maint (diff) | |
download | tgif-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.c | 7 |
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; + } } |