Skip to content
Snippets Groups Projects
Commit bf94bbd3 authored by Guido Günther's avatar Guido Günther
Browse files

xen: Don't crash when we fail to init caps

Closes: #656075
parent 97182f95
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,4 @@ Disable-daemon-start-test.patch
Disable-gnulib-s-test-nonplocking-pipe.sh.patch
Disable-failing-virnetsockettest.patch
Don-t-fail-if-we-can-t-setup-avahi.patch
xen-Don-t-crash-when-we-fail-to-init-caps.patch
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Fri, 20 Jan 2012 08:56:39 +0100
Subject: xen: Don't crash when we fail to init caps
by dereferencing a NULL pointer in the call to
virNodeSuspendGetTargetMask.
---
src/xen/xen_hypervisor.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 5357ac1..6d8dda7 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -2802,6 +2802,8 @@ xenHypervisorMakeCapabilities(virConnectPtr conn)
utsname.machine,
cpuinfo,
capabilities);
+ if (caps == NULL)
+ return NULL;
if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
VIR_WARN("Failed to get host power management capabilities");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment