diff options
author | Osier Yang <jyang@redhat.com> | 2012-05-02 23:05:59 +0800 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2012-06-07 18:15:49 -0400 |
commit | d55bf4d3e48a24871bd5a6a096543f3f7b7d491d (patch) | |
tree | cfddf85655e590d622a387198faa985647f123e4 /libvirt-override.c | |
parent | e90c8c4b20ac7c2ba48c0bfc7fb226cdb4fba1d3 (diff) | |
download | libvirt-python-v6-d55bf4d3e48a24871bd5a6a096543f3f7b7d491d.tar.gz libvirt-python-v6-d55bf4d3e48a24871bd5a6a096543f3f7b7d491d.tar.xz libvirt-python-v6-d55bf4d3e48a24871bd5a6a096543f3f7b7d491d.zip |
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 b80f4db9931ceea4bec1d178322058df77ece7a4)
Diffstat (limited to 'libvirt-override.c')
-rw-r--r-- | libvirt-override.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libvirt-override.c b/libvirt-override.c index 56f96ba..130e702 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -71,7 +71,7 @@ static char *py_str(PyObject *obj) /* Helper function to convert a virTypedParameter output array into a * Python dictionary for return to the user. Return NULL on failure, * after raising a python exception. */ -static PyObject * ATTRIBUTE_NONNULL(1) +static PyObject * getPyVirTypedParameter(const virTypedParameterPtr params, int nparams) { PyObject *key, *val, *info; |