提交 0322643e 编写于 作者: J John Ferlan

libxl_migration: Resolve Coverity NULL_RETURNS

Coverity noted that all callers to libxlDomainEventQueue() could ensure
the second parameter (event) was true before calling except this case.
As I look at the code and how events are used - it seems that prior to
generating an event for the dom == NULL condition, the resume/suspend
event should be queue'd after the virDomainSaveStatus() call which will
goto cleanup and queue the saved event anyway.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 d1bde8ed
......@@ -515,6 +515,11 @@ libxlDomainMigrationFinish(virConnectPtr dconn,
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto cleanup;
if (event) {
libxlDomainEventQueue(driver, event);
event = NULL;
}
dom = virGetDomain(dconn, vm->def->name, vm->def->uuid);
if (dom == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册