summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2015-03-17 15:42:29 +0100
committerFabiano FidĂȘncio <fidencio@redhat.com>2016-01-05 21:28:44 +0100
commit5c3d146fb7c7e7ca02023f80c1d1bab7d617f614 (patch)
tree5bc0af003b8695e943e40dbdd28896fa21834a3e
parent02c47f2970ada4f067e76298e424956e1c53752d (diff)
virt-viewer: Clean up if no vm was chosen
It is safe to clean up when running virt-viewer without specifying vm name if no vm was chosen. It brings back behavior before 88f6341. The 'if (dom == NULL && err != NULL)' part was affected by commits 824c4b9, 1eaaf8c, 15c7d17 so the check for 'err' is not needed anymore. (cherry picked from commit 66afac53b6769f079d537cfa130f212286981c93)
-rw-r--r--src/virt-viewer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virt-viewer.c b/src/virt-viewer.c
index b5a75dd..62124d3 100644
--- a/src/virt-viewer.c
+++ b/src/virt-viewer.c
@@ -745,7 +745,7 @@ virt_viewer_initial_connect(VirtViewerApp *app, GError **error)
&priv->domkey,
priv->conn,
&err);
- if (dom == NULL && err != NULL) {
+ if (dom == NULL) {
goto cleanup;
}
}