1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-08-01 00:21:59 +03:00

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 c9378ecd73
commit ccac37e304

View File

@ -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))