Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Nov 6, 2022
1 parent 29e1076 commit 952ff46
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Modules/syslogmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,12 @@ syslog_closelog_impl(PyObject *module)
_syslog_state *state = get_syslog_state(module);
if (state->S_log_open) {
closelog();
Py_CLEAR(state->S_ident_o);
state->S_log_open = 0;
}

if (state->S_ident_o != NULL) {
Py_CLEAR(state->S_ident_o);
}
Py_RETURN_NONE;
}

Expand Down Expand Up @@ -397,9 +400,12 @@ _syslog_clear(PyObject *module)
_syslog_state *state = get_syslog_state(module);
if (state->S_log_open) {
closelog();
Py_CLEAR(state->S_ident_o);
state->S_log_open = 0;
}

if (state->S_ident_o != NULL) {
Py_CLEAR(state->S_ident_o);
}
return 0;
}

Expand Down

0 comments on commit 952ff46

Please sign in to comment.