提交 c66e344e 编写于 作者: J Jim Fehlig

libxl: dont dereference NULL libxlDomainObjPrivatePtr

In libxlDomainMigrationPrepare it is possible to dereference a NULL
libxlDomainObjPrivatePtr in early error paths. Check for a valid
'priv' before using it.
Signed-off-by: NJim Fehlig <jfehlig@suse.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 594b8b99
......@@ -804,9 +804,10 @@ libxlDomainMigrationPrepare(virConnectPtr dconn,
}
VIR_FREE(socks);
virObjectUnref(args);
virPortAllocatorRelease(priv->migrationPort);
priv->migrationPort = 0;
if (priv) {
virPortAllocatorRelease(priv->migrationPort);
priv->migrationPort = 0;
}
/* Remove virDomainObj from domain list */
if (vm) {
virDomainObjListRemove(driver->domains, vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册