Always clear out the last_error in virshReportError.

Otherwise you can get bogus "unknown error" printouts on
subsequent commands.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
Chris Lalancette
2010-07-19 14:56:29 -04:00
parent 0cdff7b5e7
commit 4487d33f67
+1 -1
View File
@@ -387,7 +387,7 @@ virshReportError(vshControl *ctl)
* no error was ever raised, so just ignore */
last_error = virSaveLastError();
if (!last_error || last_error->code == VIR_ERR_OK)
return;
goto out;
}
if (last_error->code == VIR_ERR_OK) {