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:
parent
e2f48bf0e8
commit
4b430e5f69
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue