libvirt/c66e344e-libxl-dont-deref-NULL.patch
James Fehlig 1ea77165a0 Accepting request 589839 from home:jfehlig:branches:Virtualization
- libxl: don't hardcode scheduler weight
  83edaf44-libxl-dont-hardcode-sched-weight.patch
  bsc#1086377

- libxl: fixes and improvements in migration APIs
  64370c4b-libxl-MigrateBegin.patch,
  99486799-libxl-MigrateConfirm.patch,
  f5eacf2a-libxl-MigratePerform.patch,
  4e6fcdb6-libxl-libxlDomObjFromDomain-cleanup.patch,
  fe51dbda-libxl-use-FindByRef.patch,
  60b3fcd9-libxl-MigratePrepare.patch,
  3c89868c-libxl-lock-after-ListRemove.patch,
  13e81fc6-libxl-EndJob-on-error.patch,
  594b8b99-libxl-DefineXMLFlags-API-pattern.patch,
  c66e344e-libxl-dont-deref-NULL.patch
  bsc#1080957

OBS-URL: https://build.opensuse.org/request/show/589839
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=681
2018-03-22 00:33:49 +00:00

31 lines
1.0 KiB
Diff

commit c66e344e38269227c93e598f599108a65b066fc0
Author: Jim Fehlig <jfehlig@suse.com>
Date: Fri Mar 16 15:00:17 2018 -0600
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>
Index: libvirt-4.1.0/src/libxl/libxl_migration.c
===================================================================
--- libvirt-4.1.0.orig/src/libxl/libxl_migration.c
+++ libvirt-4.1.0/src/libxl/libxl_migration.c
@@ -804,8 +804,10 @@ libxlDomainMigrationPrepare(virConnectPt
}
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) {