git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
98cdfbb
)
shallow.c: don't free unallocated slabs
author
Ali Utku Selen
<redacted>
Mon, 30 Sep 2019 23:33:10 +0000
(
01:33
+0200)
committer
Junio C Hamano
<redacted>
Wed, 2 Oct 2019 06:03:47 +0000
(15:03 +0900)
Fix possible segfault when cloning a submodule shallow.
Signed-off-by: Ali Utku Selen <redacted>
Signed-off-by: Junio C Hamano <redacted>
shallow.c
patch
|
blob
|
history
diff --git
a/shallow.c
b/shallow.c
index c1b68533ca3d831afcef7fd655cce95d8db89547..8de0bad2a5afd6547c56bed5bf6a1179ba574423 100644
(file)
--- a/
shallow.c
+++ b/
shallow.c
@@
-148,6
+148,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]);
}
git clone https://git.99rst.org/PROJECT