diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-12 00:00:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-12 00:00:00 -0800 |
commit | 9b2a1821245c0e638f7b5e9da81118743fcc0120 (patch) | |
tree | a057310d65a9653e614b241b5c33a621a68fc60b | |
parent | a74fa1106dd29390077025e7f176cf6b53eada62 (diff) | |
parent | 295dd2ad201c0ebb281563750a13d904bd466e01 (diff) | |
download | git-9b2a1821245c0e638f7b5e9da81118743fcc0120.tar.gz git-9b2a1821245c0e638f7b5e9da81118743fcc0120.tar.xz |
Merge branch 'sp/maint-plug-traverse-commit-list-leak' into maint
* sp/maint-plug-traverse-commit-list-leak:
Fix memory leak in traverse_commit_list
-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 e5c88c278..4ef58e7ec 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; + } } |