summaryrefslogtreecommitdiff
path: root/src/python-systemd
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-07 15:32:33 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-07 15:35:50 -0500
commitdb7f1dde30068bd980c78db77867b6956f5295e2 (patch)
tree29ffd3a7212ed5bab212b80fe267da51ae041407 /src/python-systemd
parent516424a411925d8141e1f72422f85ffb1639d5ea (diff)
systemd-python: fix segfault on double close
Diffstat (limited to 'src/python-systemd')
-rw-r--r--src/python-systemd/_reader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index 52e6b1c7a..160ab69a3 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -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;
}