Blame SOURCES/libvirt-python-override-Fix-two-uninitialized-variables-in-convertDomainStatsRecord.patch

b79911
From feb429c6829912ea2680bb65ca41f90c90d8cefe Mon Sep 17 00:00:00 2001
b79911
Message-Id: <feb429c6829912ea2680bb65ca41f90c90d8cefe@dist-git>
b79911
From: Peter Krempa <pkrempa@redhat.com>
b79911
Date: Tue, 2 Sep 2014 14:47:24 +0200
b79911
Subject: [PATCH] override: Fix two uninitialized variables in
b79911
 convertDomainStatsRecord
b79911
b79911
py_record_domain and py_record_stats would be accessed uninitialized if
b79911
an out-of-memory condition would happen in the first loop. Unlikely, but
b79911
coverity complained.
b79911
b79911
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1136354
b79911
(cherry picked from commit 23e22c2df148a402a0221c475e139b8ea19fbbd5)
b79911
b79911
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
b79911
---
b79911
 libvirt-override.c | 4 ++--
b79911
 1 file changed, 2 insertions(+), 2 deletions(-)
b79911
b79911
diff --git a/libvirt-override.c b/libvirt-override.c
b79911
index 17ea042..872e33b 100644
b79911
--- a/libvirt-override.c
b79911
+++ b/libvirt-override.c
b79911
@@ -7963,8 +7963,8 @@ convertDomainStatsRecord(virDomainStatsRecordPtr *records,
b79911
 {
b79911
     PyObject *py_retval;
b79911
     PyObject *py_record;
b79911
-    PyObject *py_record_domain;
b79911
-    PyObject *py_record_stats;
b79911
+    PyObject *py_record_domain = NULL;
b79911
+    PyObject *py_record_stats = NULL;
b79911
     size_t i;
b79911
 
b79911
     if (!(py_retval = PyList_New(nrecords)))
b79911
-- 
b79911
2.1.0
b79911