diff options
author | Raymond Hettinger <python@rcn.com> | 2004-12-17 14:44:45 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-12-17 14:44:45 (GMT) |
commit | fe09fa2ff190b4f6ac0724484085459ad83ba1a9 (patch) | |
tree | 920889b0961d8ad2c2f6ae418d0e77d28f548fc2 /Modules | |
parent | 19c9a85fea5cc34238cc6863d80e30472118a61c (diff) | |
download | cpython-fe09fa2ff190b4f6ac0724484085459ad83ba1a9.zip cpython-fe09fa2ff190b4f6ac0724484085459ad83ba1a9.tar.gz cpython-fe09fa2ff190b4f6ac0724484085459ad83ba1a9.tar.bz2 |
Backport fixes for bugs #1086555 and #1085744.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/syslogmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index 75deb1b..1f2b874 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -57,17 +57,18 @@ syslog_openlog(PyObject * self, PyObject * args) { long logopt = 0; long facility = LOG_USER; + PyObject *new_S_ident_o; - - Py_XDECREF(S_ident_o); if (!PyArg_ParseTuple(args, "S|ll;ident string [, logoption [, facility]]", - &S_ident_o, &logopt, &facility)) + &new_S_ident_o, &logopt, &facility)) return NULL; /* This is needed because openlog() does NOT make a copy * and syslog() later uses it.. cannot trash it. */ + Py_XDECREF(S_ident_o); + S_ident_o = new_S_ident_o; Py_INCREF(S_ident_o); openlog(PyString_AsString(S_ident_o), logopt, facility); |