Skip to content

Commit 3203566

Browse files
glandiumgitster
authored andcommitted
Use xmmap_gently instead of xmmap in use_pack
use_pack has its own error message on mmap error, but it can't be reached when using xmmap, which dies with its own error. Signed-off-by: Mike Hommey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8b35542 commit 3203566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ unsigned char *use_pack(struct packed_git *p,
630630
while (packed_git_limit < pack_mapped
631631
&& unuse_one_window(p))
632632
; /* nothing */
633-
win->base = xmmap(NULL, win->len,
633+
win->base = xmmap_gently(NULL, win->len,
634634
PROT_READ, MAP_PRIVATE,
635635
p->pack_fd, win->offset);
636636
if (win->base == MAP_FAILED)

0 commit comments

Comments
 (0)