7a3408
From 7306403f40cb6bf780db655dbd66867dad989df7 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <7306403f40cb6bf780db655dbd66867dad989df7@dist-git>
7a3408
From: Andrea Bolognani <abologna@redhat.com>
7a3408
Date: Tue, 11 Aug 2015 18:46:54 +0200
7a3408
Subject: [PATCH] cpu: Fix segfault in the ppc64 driver
7a3408
7a3408
Commit adb865d introduced some changes in ppc64DriverNodeData()
7a3408
that cause libvirtd to crash on startup unless this patch is
7a3408
applied as well.
7a3408
7a3408
(cherry picked from commit 133c25c81c9ef79053d8d67a1e897846f9d7adb5)
7a3408
7a3408
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1250977
7a3408
7a3408
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 src/cpu/cpu_ppc64.c | 2 +-
7a3408
 1 file changed, 1 insertion(+), 1 deletion(-)
7a3408
7a3408
diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c
7a3408
index 33fec8b..85aa5bc 100644
7a3408
--- a/src/cpu/cpu_ppc64.c
7a3408
+++ b/src/cpu/cpu_ppc64.c
7a3408
@@ -628,7 +628,7 @@ ppc64DriverNodeData(virArch arch)
7a3408
     if (VIR_ALLOC(nodeData) < 0)
7a3408
         goto error;
7a3408
 
7a3408
-    if (VIR_ALLOC(data) < 0)
7a3408
+    if (VIR_ALLOC(nodeData->data.ppc64) < 0)
7a3408
         goto error;
7a3408
 
7a3408
     data = nodeData->data.ppc64;
7a3408
-- 
7a3408
2.5.0
7a3408