aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2014-08-26 19:17:56 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-29 10:46:57 +0100
commit40ed35a3c4f7d26247cbbb01a2b3ff544fb50819 (patch)
tree7d4f3e3e7f7bb605089a06ab8b1be926eea5639b /hw
parentcbda016d94017fad3be1c657f0ad98f88395c12a (diff)
downloadqemu-40ed35a3c4f7d26247cbbb01a2b3ff544fb50819.zip
qemu-40ed35a3c4f7d26247cbbb01a2b3ff544fb50819.tar.gz
qemu-40ed35a3c4f7d26247cbbb01a2b3ff544fb50819.tar.bz2
qemu-img: always goto out in img_snapshot() error paths
The out label has the qemu_progress_end() and other cleanup calls. Always goto out in error paths so the cleanup happens. These error paths now return 1 instead of -1. 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. Reported-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'hw')
0 files changed, 0 insertions, 0 deletions