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.
This commit is contained in:
Pavel Grunt
2015-03-17 15:42:29 +01:00
committed by Fabiano Fidêncio
parent 1a619f2383
commit 66afac53b6

View File

@ -732,7 +732,7 @@ virt_viewer_initial_connect(VirtViewerApp *app, GError **error)
&priv->domkey,
priv->conn,
&err);
if (dom == NULL && err != NULL) {
if (dom == NULL) {
goto cleanup;
}
}