зеркало из https://github.com/microsoft/git.git
Merge branch 'as/shallow-slab-use-fix'
Correct code that tried to reference all entries in a sparse array of pointers by mistake. * as/shallow-slab-use-fix: shallow.c: don't free unallocated slabs
This commit is contained in:
Коммит
678a9ca629
|
@ -156,6 +156,8 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
|
|||
for (i = 0; i < depths.slab_count; i++) {
|
||||
int j;
|
||||
|
||||
if (!depths.slab[i])
|
||||
continue;
|
||||
for (j = 0; j < depths.slab_size; j++)
|
||||
free(depths.slab[i][j]);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче