chiark / gitweb /
systemd-python: fix segfault on double close
[elogind.git] / src / python-systemd / _reader.c
index 52e6b1c..160ab69 100644 (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;
 }