[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hd
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v2] file-posix: Don't leak fd in hdev_get_max_segments |
Date: |
Tue, 14 Mar 2017 11:20:51 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 03/14/2017 11:12 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> block/file-posix.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index c4c0663..d670be3 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -703,6 +703,9 @@ static int hdev_get_max_segments(const struct stat *st)
> }
>
> out:
> + if (fd != -1) {
> + close(fd);
> + }
Mails crossed - I see I asked about this in reply to v1 after you
already sent v2 minutes earlier.
I still think it might be nice to mention a commit id that you are
fixing (one of my reply-to-self on your v1), but either way,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature