summaryrefslogtreecommitdiffstats
path: root/Modules/cStringIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r--Modules/cStringIO.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index 3529047..139a4a8 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -575,8 +575,7 @@ newOobject(int size) {
static PyObject *
I_close(Iobject *self, PyObject *unused) {
- Py_XDECREF(self->pbuf);
- self->pbuf = NULL;
+ Py_CLEAR(self->pbuf);
self->buf = NULL;
self->pos = self->string_size = 0;