Re: [PATCH] fixup! propagate errno from failing read
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Aug 17, 2021, 16:14 UTC
- Message-ID
- <20210817161419.3606302-1-jonathantanmy@google.com>
- In-Reply-To
- <pull.1068.git.git.1629203489546.gitgitgadget@gmail.com>
Show 12 quoted lines
> 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@google.com>
Thanks - a straightforward fixup. (I don't think we need the errno from close() in this case.)