In a couple of commands virsh catches & ignores errors, but fails
to reset last_error. Thus the error is ignored, but still reported
to the user.
* tools/virsh.c: Reset last_error if ignoring an error
if (last_error->code != VIR_ERR_NO_SUPPORT) {
virDomainFree(dom);
return FALSE;
+ } else {
+ virFreeError(last_error);
+ last_error = NULL;
}
} else {
/* Only print something if a security model is active */
if (!tmp || virStrToLong_i(tmp + 1, &tmp, 10, &count) < 0)
count = -1;
}
+ virFreeError(last_error);
+ last_error = NULL;
VIR_FREE(xml);
}