[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] qemu-img: always goto out in img_snapshot()
From: |
Stefan Hajnoczi |
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 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Aug 27, 2014 at 08:35:33AM +0200, Markus Armbruster wrote:
> Stefan Hajnoczi <address@hidden> 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
pgparLOO1xPKv.pgp
Description: PGP signature