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

_pickle.Unpickler.__init__() should return -1 if Pdata_New() fails, not 1.
(cherry picked from commit 4b430e5f69)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-09-28 23:01:48 -07:00 committed by GitHub
parent 007fda436f
commit 758ad54dac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -6804,7 +6804,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);