systemd-python: fix segfault on double close

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-03-07 15:32:33 -05:00
parent 516424a411
commit db7f1dde30
2 changed files with 3 additions and 0 deletions

View File

@@ -171,6 +171,7 @@ PyDoc_STRVAR(Reader_close__doc__,
static PyObject* Reader_close(Reader *self, PyObject *args)
{
sd_journal_close(self->j);
self->j = NULL;
Py_RETURN_NONE;
}