mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-129345: null check for indent syslogmodule (#129348)
This commit is contained in:
parent
c67afb581e
commit
25cf79a082
2 changed files with 2 additions and 1 deletions
|
@ -0,0 +1 @@
|
|||
Fix null pointer dereference in :func:`syslog.openlog` when an audit hook raises an exception.
|
|
@ -176,7 +176,7 @@ syslog_openlog_impl(PyObject *module, PyObject *ident, long logopt,
|
|||
}
|
||||
}
|
||||
if (PySys_Audit("syslog.openlog", "Oll", ident ? ident : Py_None, logopt, facility) < 0) {
|
||||
Py_DECREF(ident);
|
||||
Py_XDECREF(ident);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue