Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea94ba4

Browse files
author
Stefan Krah
committed
Merge 3.2.
2 parents 8c195af + 96efdd4 commit ea94ba4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Modules/_io/bytesio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,10 @@ bytesio_getstate(bytesio *self)
692692
}
693693
else {
694694
dict = PyDict_Copy(self->dict);
695-
if (dict == NULL)
695+
if (dict == NULL) {
696+
Py_DECREF(initvalue);
696697
return NULL;
698+
}
697699
}
698700

699701
state = Py_BuildValue("(OnN)", initvalue, self->pos, dict);

0 commit comments

Comments
 (0)