Skip to content
Snippets Groups Projects
Unverified Commit 2f9e47c0 authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub
Browse files

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


(cherry picked from commit b1f648ef)

Co-authored-by: default avatarNoam Cohen <noam@noam.me>
parent a4fd7321
Branches
Tags
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment