Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
gh-129345: null check for indent syslogmodule (GH-129348)
(cherry picked from commit 25cf79a)

Co-authored-by: Burkov Egor <[email protected]>
  • Loading branch information
wooffie authored and miss-islington committed Jan 29, 2025
commit 46db2069622b239f5a9adc419a9af0b69110a634
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix null pointer dereference in :func:`syslog.openlog` when an audit hook raises an exception.
2 changes: 1 addition & 1 deletion Modules/syslogmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,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;
}

Expand Down