mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-06 13:05:20 +00:00
Coverity: Fix the forward_null error in Python binding codes
Related coverity log:
Error: FORWARD_NULL:
/builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:355:
assign_zero: Assigning: "params" = 0.
/builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:458:
var_deref_model: Passing null variable "params" to function
"getPyVirTypedParameter", which dereferences it. (The dereference is assumed on
the basis of the 'nonnull' parameter attribute.)
(cherry picked from commit b80f4db993
)
This commit is contained in:
parent
e28cfeb11d
commit
8d19662026
@ -71,7 +71,7 @@ static char *py_str(PyObject *obj)
|
|||||||
/* Helper function to convert a virTypedParameter output array into a
|
/* Helper function to convert a virTypedParameter output array into a
|
||||||
* Python dictionary for return to the user. Return NULL on failure,
|
* Python dictionary for return to the user. Return NULL on failure,
|
||||||
* after raising a python exception. */
|
* after raising a python exception. */
|
||||||
static PyObject * ATTRIBUTE_NONNULL(1)
|
static PyObject *
|
||||||
getPyVirTypedParameter(const virTypedParameterPtr params, int nparams)
|
getPyVirTypedParameter(const virTypedParameterPtr params, int nparams)
|
||||||
{
|
{
|
||||||
PyObject *key, *val, *info;
|
PyObject *key, *val, *info;
|
||||||
|
Loading…
Reference in New Issue
Block a user