Visitar URL original
gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails by noamcohen97 · Pull Request #95264 · python/cpython · GitHub
Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Modules/syslogmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,13 @@ syslog_syslog(PyObject * self, PyObject * args)
*/
if ((openargs = PyTuple_New(0))) {
Comment thread
noamcohen97 marked this conversation as resolved.
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 {
Comment thread
noamcohen97 marked this conversation as resolved.
Outdated
return NULL;
}
}

Expand Down