summary refs log tree commit diff stats
path: root/net/socket.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-10-17 10:26:36 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-10-19 14:51:34 +0200
commit4dd32b3dda3ebc3ac9dd6b951a40a3e4f2f0fd47 (patch)
treebc87057c196b1c503f697197e7b595046101585e /net/socket.c
parent1028283c60e6e35911bb80b959a533b4af1b8b65 (diff)
downloadfocaccia-qemu-4dd32b3dda3ebc3ac9dd6b951a40a3e4f2f0fd47.tar.gz
focaccia-qemu-4dd32b3dda3ebc3ac9dd6b951a40a3e4f2f0fd47.zip
migration: Fix !replay_can_snapshot() error handling
Calling error_report() in a function that takes an Error ** argument
is suspicious.  save_snapshot() and load_snapshot() do that, and then
fail without setting an error.  Wrong.  The HMP commands survive this
unscathed, since hmp_handle_error() does nothing when no error has
been set.  Callers main() (on behalf of -loadvm) and
replay_vmstate_init() crash, but I'm not sure the error is possible
there.

Screwed up when commit 377b21ccea1 (v2.12.0) added incorrect error
handling right next to correct examples.  Fix by calling error_setg()
instead of error_report().

Fixes: 377b21ccea1755a8b0dae822c29567c58dda6939
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20181017082702.5581-13-armbru@redhat.com>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions