]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: ensure SIGINT action is reset on all errors
authorMichael Chapman <mike@very.puzzling.org>
Wed, 27 Jan 2016 02:24:53 +0000 (13:24 +1100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 1 Feb 2016 17:04:48 +0000 (18:04 +0100)
If virTimeMillisNow() fails, the SIGINT action must be reset back to
its previous state.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
tools/virsh-domain.c

index cdeccaced67374b91fccfdb5ec628296c9474651..750b273baa55618d64eafc297395ec37043ec981 100644 (file)
@@ -1857,7 +1857,7 @@ virshBlockJobWait(virshBlockJobWaitDataPtr data)
 
     if (data->timeout && virTimeMillisNow(&start) < 0) {
         vshSaveLibvirtError();
-        return -1;
+        goto cleanup;
     }
 
     last.cur = last.end = 0;