Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c31df04

Browse files
committed
Issue #18408: Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroy
the newly created pickler, and not PyObject_GC_Del().
1 parent cc35159 commit c31df04

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_pickle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ _Pickler_New(void)
782782
self->max_output_len);
783783

784784
if (self->memo == NULL || self->output_buffer == NULL) {
785-
PyObject_GC_Del(self);
785+
Py_DECREF(self);
786786
return NULL;
787787
}
788788
return self;

0 commit comments

Comments
 (0)