From: Federico Simoncelli Date: Tue, 11 Sep 2012 14:41:49 +0000 (-0400) Subject: python: Initialize new_params in virDomainSetSchedulerParameters X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=984a73c0b3c7e724363148f39f44739fe98386b2;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git 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 --- diff --git a/python/libvirt-override.c b/python/libvirt-override.c index bb1d881f1..485ed2888 100644 --- a/python/libvirt-override.c +++ b/python/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))