Skip to content
Snippets Groups Projects
Unverified Commit b1f648ef authored by Noam Cohen's avatar Noam Cohen Committed by GitHub
Browse files

gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails (GH-95264)

parent a5dde0fe
Branches
Tags
No related merge requests found
...@@ -191,8 +191,14 @@ syslog_syslog(PyObject * self, PyObject * args) ...@@ -191,8 +191,14 @@ syslog_syslog(PyObject * self, PyObject * args)
*/ */
if ((openargs = PyTuple_New(0))) { if ((openargs = PyTuple_New(0))) {
PyObject *openlog_ret = syslog_openlog(self, openargs, NULL); PyObject *openlog_ret = syslog_openlog(self, openargs, NULL);
Py_XDECREF(openlog_ret);
Py_DECREF(openargs); Py_DECREF(openargs);
if (openlog_ret == NULL) {
return NULL;
}
Py_DECREF(openlog_ret);
}
else {
return NULL;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment