From 4b430e5f6954ef4b248e95bfb4087635dcdefc6d Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Fri, 28 Sep 2018 23:48:46 -0600 Subject: Fix incorrect error handling in _pickle.Unpickler.__init__() (GH-9630) _pickle.Unpickler.__init__() should return -1 if Pdata_New() fails, not 1. --- Modules/_pickle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 3588e33..0e3bd22 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); -- cgit v0.12