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>
This commit is contained in:
Federico Simoncelli 2012-09-11 10:41:49 -04:00 committed by Eric Blake
parent 0b2c40d455
commit 984a73c0b3

View File

@ -700,7 +700,7 @@ libvirt_virDomainSetSchedulerParameters(PyObject *self ATTRIBUTE_UNUSED,
int i_retval; int i_retval;
int nparams = 0; int nparams = 0;
Py_ssize_t size = 0; Py_ssize_t size = 0;
virTypedParameterPtr params, new_params; virTypedParameterPtr params, new_params = NULL;
if (!PyArg_ParseTuple(args, (char *)"OO:virDomainSetScedulerParameters", if (!PyArg_ParseTuple(args, (char *)"OO:virDomainSetScedulerParameters",
&pyobj_domain, &info)) &pyobj_domain, &info))