1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-24 00:58:54 +03:00

override: Fix two uninitialized variables in convertDomainStatsRecord

py_record_domain and py_record_stats would be accessed uninitialized if
an out-of-memory condition would happen in the first loop. Unlikely, but
coverity complained.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1136354
This commit is contained in:
Peter Krempa
2014-09-02 14:39:02 +02:00
parent bc6da3214c
commit 23e22c2df1

View File

@ -7963,8 +7963,8 @@ convertDomainStatsRecord(virDomainStatsRecordPtr *records,
{
PyObject *py_retval;
PyObject *py_record;
PyObject *py_record_domain;
PyObject *py_record_stats;
PyObject *py_record_domain = NULL;
PyObject *py_record_stats = NULL;
size_t i;
if (!(py_retval = PyList_New(nrecords)))