diff options
author | Marek Marczykowski <marmarek@invisiblethingslab.com> | 2012-03-13 17:19:47 +0000 |
---|---|---|
committer | Marek Marczykowski <marmarek@invisiblethingslab.com> | 2012-03-13 17:19:47 +0000 |
commit | c0bcb80839f9f2a1275277701ece61f61c6bf02d (patch) | |
tree | 35b049c74981ce1c988b4890478831a25991474a /tools/python | |
parent | 6cf4c493d1f781f011af064385b303aa547f755d (diff) | |
download | xen-c0bcb80839f9f2a1275277701ece61f61c6bf02d.tar.gz xen-c0bcb80839f9f2a1275277701ece61f61c6bf02d.tar.bz2 xen-c0bcb80839f9f2a1275277701ece61f61c6bf02d.zip |
tools/python: Py_INCREF(Py_None) when returing Py_None
Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/python')
-rw-r--r-- | tools/python/xen/lowlevel/xl/xl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index 74c8c887e5..8ca429a3c2 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -408,6 +408,8 @@ static PyObject *pyxl_domid_to_name(XlObject *self, PyObject *args) domname = libxl_domid_to_name(self->ctx, domid); if (domname) ret = PyString_FromString(domname); + else + Py_INCREF(Py_None); free(domname); return ret; |