diff options
author | Simon McVittie <smcv@debian.org> | 2010-12-02 16:31:07 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2010-12-02 16:31:07 +0000 |
commit | 56ad64cd14e52b479489549f76343f19e3842139 (patch) | |
tree | 645b786f39e8fa58247a3b69d9e5754ed18c9319 /_dbus_bindings/bytes.c | |
parent | cb1bbd2414e892469023653ea7ddd5d39cd76b84 (diff) | |
download | dbus-python-56ad64cd14e52b479489549f76343f19e3842139.tar.gz |
Use Py_CLEAR for greater robustness
Diffstat (limited to '_dbus_bindings/bytes.c')
-rw-r--r-- | _dbus_bindings/bytes.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/_dbus_bindings/bytes.c b/_dbus_bindings/bytes.c index a5648fe..bc12a14 100644 --- a/_dbus_bindings/bytes.c +++ b/_dbus_bindings/bytes.c @@ -104,12 +104,10 @@ Byte_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs) tuple = Py_BuildValue("(O)", obj); if (!tuple) return NULL; - Py_DECREF(obj); - obj = NULL; + Py_CLEAR(obj); obj = DBusPyIntBase_Type.tp_new(cls, tuple, kwargs); - Py_DECREF(tuple); - tuple = NULL; + Py_CLEAR(tuple); return obj; bad_arg: |