Skip to content

Commit c43a1be

Browse files
committed
Merge branch 'jc/maint-smart-http-race-upload-pack' into maint
* jc/maint-smart-http-race-upload-pack: get_indexed_object can return NULL if nothing is in that slot; check for it
2 parents b0b35a6 + 2a74532 commit c43a1be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

upload-pack.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ static void check_non_tip(void)
533533
namebuf[41] = '\n';
534534
for (i = get_max_object_index(); 0 < i; ) {
535535
o = get_indexed_object(--i);
536+
if (!o)
537+
continue;
536538
if (!(o->flags & OUR_REF))
537539
continue;
538540
memcpy(namebuf + 1, sha1_to_hex(o->sha1), 40);

0 commit comments

Comments
 (0)