> diff --git a/refs/files-backend.c b/refs/files-backend.c > index 0d96eeba61b..f546cc3cc3d 100644 > --- a/refs/files-backend.c > +++ b/refs/files-backend.c > @@ -454,6 +454,7 @@ stat_ref: > } > strbuf_reset(&sb_contents); > if (strbuf_read(&sb_contents, fd, 256) < 0) { > + myerr = errno; > close(fd); > goto out; > } Reviewed-by: Jonathan Tan <jonathantanmy@xxxxxxxxxx> Thanks - a straightforward fixup. (I don't think we need the errno from close() in this case.)