]> xenbits.xensource.com Git - libvirt.git/commitdiff
Always clear out the last_error in virshReportError.
authorChris Lalancette <clalance@redhat.com>
Fri, 18 Jun 2010 14:14:04 +0000 (10:14 -0400)
committerChris Lalancette <clalance@redhat.com>
Mon, 19 Jul 2010 18:56:29 +0000 (14:56 -0400)
Otherwise you can get bogus "unknown error" printouts on
subsequent commands.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
tools/virsh.c

index 1825c0c48f97bd03dbca4a176e8626e21a8627ad..ffd22ab3205797cbe835ca37654841b9b7b6020a 100644 (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) {