Skip to content

Commit 25cf79a

Browse files
authored
gh-129345: null check for indent syslogmodule (#129348)
1 parent c67afb5 commit 25cf79a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix null pointer dereference in :func:`syslog.openlog` when an audit hook raises an exception.

Modules/syslogmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ syslog_openlog_impl(PyObject *module, PyObject *ident, long logopt,
176176
}
177177
}
178178
if (PySys_Audit("syslog.openlog", "Oll", ident ? ident : Py_None, logopt, facility) < 0) {
179-
Py_DECREF(ident);
179+
Py_XDECREF(ident);
180180
return NULL;
181181
}
182182

0 commit comments

Comments
 (0)