qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: dplotnikov@virtuozzo.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-io: Don't leak pattern file in error path
Date: Tue, 10 Sep 2019 09:45:00 +0200	[thread overview]
Message-ID: <ea02ee70-9feb-db7d-3180-b34232466b0c@redhat.com> (raw)
In-Reply-To: <20190910070949.16256-1-kwolf@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 600 bytes --]

On 10.09.19 09:09, 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 <kwolf@redhat.com>
> ---
>  qemu-io-cmds.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Max Reitz <mreitz@redhat.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-09-10  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10  7:09 [Qemu-devel] [PATCH] qemu-io: Don't leak pattern file in error path Kevin Wolf
2019-09-10  7:45 ` Max Reitz [this message]
2019-09-10  9:33 ` [Qemu-devel] [Qemu-block] " Stefano Garzarella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea02ee70-9feb-db7d-3180-b34232466b0c@redhat.com \
    --to=mreitz@redhat.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).