Fix incorrect error handling in _pickle.Unpickler.__init__() (GH-9630)

_pickle.Unpickler.__init__() should return -1 if Pdata_New() fails, not 1.
This commit is contained in:
Zackery Spytz 2018-09-28 23:48:46 -06:00 committed by Serhiy Storchaka
parent e2f48bf0e8
commit 4b430e5f69
1 changed files with 1 additions and 1 deletions

View File

@ -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);