[libvirt] [PATCH v3 3/4] virsh: ensure SIGINT action is reset on all errors

Michael Chapman mike at very.puzzling.org
Wed Jan 27 02:24:53 UTC 2016


If virTimeMillisNow() fails, the SIGINT action must be reset back to
its previous state.

Signed-off-by: Michael Chapman <mike at very.puzzling.org>
---
 tools/virsh-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index cdeccac..750b273 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -1857,7 +1857,7 @@ virshBlockJobWait(virshBlockJobWaitDataPtr data)
 
     if (data->timeout && virTimeMillisNow(&start) < 0) {
         vshSaveLibvirtError();
-        return -1;
+        goto cleanup;
     }
 
     last.cur = last.end = 0;
-- 
2.4.3




More information about the libvir-list mailing list