summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-09-08 09:19:27 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-09-08 09:19:27 (GMT)
commitea94ba45fa845e5792020ffb5bb70f88f8642366 (patch)
tree6b154b0a9762887c2c96dc939d7a0e5559ed639b /Modules/_io
parent8c195afcace7bfb3cc6a198718f435363aecbc21 (diff)
parent96efdd422cef75f70770107847b1a97e7e524e4c (diff)
downloadcpython-ea94ba45fa845e5792020ffb5bb70f88f8642366.zip
cpython-ea94ba45fa845e5792020ffb5bb70f88f8642366.tar.gz
cpython-ea94ba45fa845e5792020ffb5bb70f88f8642366.tar.bz2
Merge 3.2.
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/bytesio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
index 20863af..54840bb 100644
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -692,8 +692,10 @@ bytesio_getstate(bytesio *self)
}
else {
dict = PyDict_Copy(self->dict);
- if (dict == NULL)
+ if (dict == NULL) {
+ Py_DECREF(initvalue);
return NULL;
+ }
}
state = Py_BuildValue("(OnN)", initvalue, self->pos, dict);