diff options
author | Jeff Cody <jcody@redhat.com> | 2013-01-15 10:47:24 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-01-17 10:51:11 +0100 |
commit | 6d759117d3fd28e38c49c56c9de206cc718d32fa (patch) | |
tree | e9e722d2b04a3685a42fda0a962a10e6ec85d1f3 /target-s390x | |
parent | 47f4dac3fde809e3da4e60d9eb699f1d4b378249 (diff) |
block: fix null-pointer bug on error case in block commit
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 <armbru@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'target-s390x')
0 files changed, 0 insertions, 0 deletions