зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
9b2a182124
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче