From: Stefan Hajnoczi <stefanha@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Jeff Cody <jcody@redhat.com>,
jsnow@redhat.com, qemu-devel@nongnu.org,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] qemu-img: always goto out in img_snapshot() error paths
Date: Wed, 27 Aug 2014 12:17:40 +0100 [thread overview]
Message-ID: <20140827111740.GG8280@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <87r402fnii.fsf@blackfin.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
On Wed, Aug 27, 2014 at 08:35:33AM +0200, Markus Armbruster wrote:
> Stefan Hajnoczi <stefanha@redhat.com> writes:
>
> > The out label has the qemu_progress_end() and other cleanup calls.
> > Always goto out in error paths so the cleanup happens.
> >
> > Note that bdrv_unref(NULL) is safe. We just need to initialize bs to
> > NULL at the top of the function.
> >
> > We can now remove the obsolete bs_old_backing = NULL and bs_new_backing
> > = NULL for safe mode. Originally it was necessary in commit 3e85c6fd
> > ("qemu-img rebase") but became useless in commit c2abcce ("qemu-img:
> > avoid calling exit(1) to release resources properly") because the
> > variables are already initialized during declaration.
>
> Please mention here that you fix exit code.from -1 to 1.
Fixed up when merging
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-08-27 11:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 18:17 [Qemu-devel] [PATCH 0/3] qemu-img: error path fixes Stefan Hajnoczi
2014-08-26 18:17 ` [Qemu-devel] [PATCH 1/3] qemu-img: fix img_commit() error return value Stefan Hajnoczi
2014-08-26 18:29 ` Max Reitz
2014-08-26 19:31 ` Eric Blake
2014-08-26 20:17 ` John Snow
2014-08-27 6:31 ` Markus Armbruster
2014-08-26 18:17 ` [Qemu-devel] [PATCH 2/3] qemu-img: fix img_compare() flags error path Stefan Hajnoczi
2014-08-26 18:30 ` Max Reitz
2014-08-26 18:17 ` [Qemu-devel] [PATCH 3/3] qemu-img: always goto out in img_snapshot() error paths Stefan Hajnoczi
2014-08-26 18:32 ` Max Reitz
2014-08-27 6:35 ` Markus Armbruster
2014-08-27 11:17 ` Stefan Hajnoczi [this message]
2014-08-26 21:02 ` [Qemu-devel] [PATCH 0/3] qemu-img: error path fixes John Snow
2014-08-27 11:17 ` Stefan Hajnoczi
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=20140827111740.GG8280@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=armbru@redhat.com \
--cc=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).