diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-09-28 23:48:46 -0600 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-09-29 08:48:46 +0300 |
commit | 4b430e5f6954ef4b248e95bfb4087635dcdefc6d (patch) | |
tree | cf08662ef8f8883f3d4c0eed2e70b0c57a56e7c6 /Modules | |
parent | e2f48bf0e851dc79d888c70fd24c631a8a9e1030 (diff) | |
download | cpython-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.c | 2 |
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); |