提交 5ca7c955 编写于 作者: J John Ferlan

libxl: Resolve Coverity warnings

Resolve two Coverity issues introduced by commit id '9b8d6e1e'
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 aec0c6d3
......@@ -98,8 +98,7 @@ libxlDoMigrateReceive(virNetSocketPtr sock,
size_t i;
int ret;
virNetSocketAccept(sock, &client_sock);
if (client_sock == NULL) {
if (virNetSocketAccept(sock, &client_sock) < 0) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Fail to accept migration connection"));
goto cleanup;
......@@ -526,8 +525,7 @@ libxlDomainMigrationFinish(virConnectPtr dconn,
cleanup:
if (event)
libxlDomainEventQueue(driver, event);
if (vm)
virObjectUnlock(vm);
virObjectUnlock(vm);
virObjectUnref(cfg);
return dom;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册