diff options
| author | Jeff Cody | 2013-01-15 16:47:24 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi | 2013-01-17 10:51:11 +0100 |
| commit | 6d759117d3fd28e38c49c56c9de206cc718d32fa (patch) | |
| tree | e9e722d2b04a3685a42fda0a962a10e6ec85d1f3 /linux-user/socket.h | |
| parent | Merge remote-tracking branch 'kraxel/chardev.1' into staging (diff) | |
| download | qemu-6d759117d3fd28e38c49c56c9de206cc718d32fa.tar.gz qemu-6d759117d3fd28e38c49c56c9de206cc718d32fa.tar.xz qemu-6d759117d3fd28e38c49c56c9de206cc718d32fa.zip | |
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 'linux-user/socket.h')
0 files changed, 0 insertions, 0 deletions
