Skip to contentSkip to conversation

spapr: fix potential segfault due to uninitialized Error*

PATCH In review Michael Roth 3 participants 3 messages Feb 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spapr: fix potential segfault due to uninitialized Error*

Introduced by 361f93e.

---
 hw/ppc/spapr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr.c +1 -1
index e1e66f2..2152704 100644
@@ -111,7 +111,7 @@ sPAPREnvironment *spapr;
 static XICSState *try_create_xics(const char *type, int nr_servers,
                                   int nr_irqs, Error **errp)
 {
-    Error *err;
+    Error *err = NULL;
     DeviceState *dev;
 
     dev = qdev_create(NULL, type);
Signature · 1 line
1.9.1