提交 984a73c0 编写于 作者: F Federico Simoncelli 提交者: Eric Blake

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: NFederico Simoncelli <fsimonce@redhat.com>
上级 0b2c40d4
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册