mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
tools/libxc: goto correct label on error paths
Both of these "goto finish;" statements are actually errors, and need to "goto out;" instead, which will correctly destroy the domain and return an error, rather than trying to finish the migration (and in at least one scenario, return success). Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: George Dunlap <george.dunlap@eu.citrix.com>
This commit is contained in:
1 parent
af172d655c
commit
c2ba706c44
1 file changed
+2
-2
@@ -1778,14 +1778,14 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
|
||||
|
||||
if ( pagebuf_get(xch, ctx, &pagebuf, io_fd, dom) ) {
|
||||
PERROR("error when buffering batch, finishing");
|
||||
goto finish;
|
||||
goto out;
|
||||
}
|
||||
memset(&tmptail, 0, sizeof(tmptail));
|
||||
tmptail.ishvm = hvm;
|
||||
if ( buffer_tail(xch, ctx, &tmptail, io_fd, max_vcpu_id, vcpumap,
|
||||
ext_vcpucontext, vcpuextstate, vcpuextstate_size) < 0 ) {
|
||||
ERROR ("error buffering image tail, finishing");
|
||||
goto finish;
|
||||
goto out;
|
||||
}
|
||||
tailbuf_free(&tailbuf);
|
||||
memcpy(&tailbuf, &tmptail, sizeof(tailbuf));
|
||||
|
||||