summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Simoncelli <fsimonce@redhat.com>2012-09-11 10:41:49 -0400
committerEric Blake <eblake@redhat.com>2012-09-11 15:19:30 -0600
commitccac37e304d2370e6f6977b62a941f106127cf64 (patch)
tree75b82431cae92a5311696f95eaf4bdeeeeb600c0
parentc9378ecd737dac326b7a4ddc44a830f2dbe0e975 (diff)
downloadlibvirt-python-split-ccac37e304d2370e6f6977b62a941f106127cf64.zip
libvirt-python-split-ccac37e304d2370e6f6977b62a941f106127cf64.tar.gz
libvirt-python-split-ccac37e304d2370e6f6977b62a941f106127cf64.tar.xz
python: Initialize new_params in virDomainSetSchedulerParameters
The new_params variable must be initialized in case the virDomainGetSchedulerParameters call fails and we hit the cleanup section before actually allocating the new parameters. Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
-rw-r--r--libvirt-override.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index bb1d881..485ed28 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -700,7 +700,7 @@ libvirt_virDomainSetSchedulerParameters(PyObject *self ATTRIBUTE_UNUSED,
int i_retval;
int nparams = 0;
Py_ssize_t size = 0;
- virTypedParameterPtr params, new_params;
+ virTypedParameterPtr params, new_params = NULL;
if (!PyArg_ParseTuple(args, (char *)"OO:virDomainSetScedulerParameters",
&pyobj_domain, &info))