mirror of https://github.com/python/cpython
Issue #18408: Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroy
the newly created pickler, and not PyObject_GC_Del().
This commit is contained in:
parent
cc35159ed8
commit
c31df04234
|
@ -782,7 +782,7 @@ _Pickler_New(void)
|
|||
self->max_output_len);
|
||||
|
||||
if (self->memo == NULL || self->output_buffer == NULL) {
|
||||
PyObject_GC_Del(self);
|
||||
Py_DECREF(self);
|
||||
return NULL;
|
||||
}
|
||||
return self;
|
||||
|
|
Loading…
Reference in New Issue