mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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: Jim Fehlig <jfehlig@suse.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
594b8b996c
commit
c66e344e38
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user