diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-11 17:09:48 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-11 17:09:48 -0800 |
commit | 7666cdedb4e73948690587cda61b256ea2367c56 (patch) | |
tree | dd2f263ea5d29a7c782939978d1dd789f8d8bcee | |
parent | Merge branch 'js/upload-pack' (diff) | |
parent | Fix memory leak in traverse_commit_list (diff) | |
download | tgif-7666cdedb4e73948690587cda61b256ea2367c56.tar.xz |
Merge branch 'sp/maint-plug-traverse-commit-list-leak' into sp/fetch-fix
* 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 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; + } } |