mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue