diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/syslogmodule.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index 27b176a..c409fe9 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -191,8 +191,14 @@ syslog_syslog(PyObject * self, PyObject * args) */ if ((openargs = PyTuple_New(0))) { PyObject *openlog_ret = syslog_openlog(self, openargs, NULL); - Py_XDECREF(openlog_ret); Py_DECREF(openargs); + if (openlog_ret == NULL) { + return NULL; + } + Py_DECREF(openlog_ret); + } + else { + return NULL; } } |