[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-io: Don't leak pattern file i
From: |
Stefano Garzarella |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-io: Don't leak pattern file in error path |
Date: |
Tue, 10 Sep 2019 11:33:55 +0200 |
User-agent: |
NeoMutt/20180716 |
On Tue, Sep 10, 2019 at 09:09:49AM +0200, Kevin Wolf wrote:
> qemu_io_alloc_from_file() needs to close the pattern file even if some
> error occurred.
>
> Setting f = NULL in the success path and checking it for NULL in the
> error path isn't strictly necessary at this point, but let's do it
> anyway in case someone later adds a 'goto error' after closing the file.
>
> Coverity: CID 1405303
> Fixes: 4d731510d34f280ed45a6de621d016f67a49ea48
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> qemu-io-cmds.c | 4 ++++
> 1 file changed, 4 insertions(+)
Reviewed-by: Stefano Garzarella <address@hidden>