提交 bf6789d9 编写于 作者: C Cole Robinson

virterror: Make SetError work if no previous error was set

virGetLastError returns NULL if no error has been set, not on
allocation error like virSetError assumed. Use virLastErrorObject
instead. This fixes virSetError when no error is currently stored.
上级 372a7f45
......@@ -304,7 +304,7 @@ int
virSetError(virErrorPtr newerr)
{
virErrorPtr err;
err = virGetLastError();
err = virLastErrorObject();
if (!err)
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册