All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH] block: Fix leak in bdrv_create_file_fallback()
Date: Wed, 26 Feb 2020 14:56:12 +0100	[thread overview]
Message-ID: <20200226135612.GF6096@linux.fritz.box> (raw)
In-Reply-To: <20200225155618.133412-1-mreitz@redhat.com>

Am 25.02.2020 um 16:56 hat Max Reitz geschrieben:
> @options is leaked by the first two return statements in this function.
> 
> Note that blk_new_open() takes the reference to @options even on
> failure, so all we need to do to fix the leak is to move the QDict
> allocation down to where we actually need it.
> 
> Reported-by: Coverity (CID 1419884)
> Fixes: fd17146cd93d1704cd96d7c2757b325fc7aac6fd
>        ("block: Generic file creation fallback")
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Thanks, applied to the block branch.

Kevin



      reply	other threads:[~2020-02-26 13:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 15:56 [PATCH] block: Fix leak in bdrv_create_file_fallback() Max Reitz
2020-02-26 13:56 ` Kevin Wolf [this message]

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=20200226135612.GF6096@linux.fritz.box \
    --to=kwolf@redhat.com \
    --cc=mreitz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.