From 4487d33f67bd0e33a3b068c5379385fb2c8627e9 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Fri, 18 Jun 2010 10:14:04 -0400 Subject: [PATCH] Always clear out the last_error in virshReportError. Otherwise you can get bogus "unknown error" printouts on subsequent commands. Signed-off-by: Chris Lalancette --- tools/virsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {