qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: fix null-pointer bug on error case in bl


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] block: fix null-pointer bug on error case in block commit
Date: Wed, 16 Jan 2013 13:53:34 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jan 15, 2013 at 10:47:24AM -0500, Jeff Cody wrote:
> This is a bug that was caught by a coverity run by Markus.  In
> the error case when we errored out to exit_restore_open early in the
> function, 'overlay_bs' was still NULL at that point, although it is
> used to look up flags and perform a bdrv_reopen().
> 
> Move the overlay_bs lookup to where it is needed, and check for NULL
> before restoring the flags.  Also get rid of the unneeded parameter
> initialization.
> 
> Reported-By: Markus Armbruster <address@hidden>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
>  block/commit.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]