Commit 4b430e5f authored by Zackery Spytz's avatar Zackery Spytz Committed by Serhiy Storchaka

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

_pickle.Unpickler.__init__() should return -1 if Pdata_New() fails, not 1.
parent e2f48bf0
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment