summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-09-28 23:48:46 -0600
committerSerhiy Storchaka <storchaka@gmail.com>2018-09-29 08:48:46 +0300
commit4b430e5f6954ef4b248e95bfb4087635dcdefc6d (patch)
treecf08662ef8f8883f3d4c0eed2e70b0c57a56e7c6 /Modules
parente2f48bf0e851dc79d888c70fd24c631a8a9e1030 (diff)
downloadcpython-git-4b430e5f6954ef4b248e95bfb4087635dcdefc6d.tar.gz
Fix incorrect error handling in _pickle.Unpickler.__init__() (GH-9630)
_pickle.Unpickler.__init__() should return -1 if Pdata_New() fails, not 1.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_pickle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 3588e33f09..0e3bd225db 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -6792,7 +6792,7 @@ _pickle_Unpickler___init___impl(UnpicklerObject *self, PyObject *file,
self->stack = (Pdata *)Pdata_New();
if (self->stack == NULL)
- return 1;
+ return -1;
self->memo_size = 32;
self->memo = _Unpickler_NewMemo(self->memo_size);