From: Chris Lalancette Date: Fri, 18 Jun 2010 14:14:04 +0000 (-0400) Subject: Always clear out the last_error in virshReportError. X-Git-Tag: v0.8.3~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4487d33f67bd0e33a3b068c5379385fb2c8627e9;p=thirdparty%2Flibvirt.git Always clear out the last_error in virshReportError. Otherwise you can get bogus "unknown error" printouts on subsequent commands. Signed-off-by: Chris Lalancette --- diff --git a/tools/virsh.c b/tools/virsh.c index 1825c0c48f..ffd22ab320 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -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) {