Skip to content

Missing PyDECREF calls for ADDITEMS opcode of _pickle.c #121137

@Legoclones

Description

@Legoclones

Bug report

Bug description:

In the load_additems function of Modules/_pickle.c (which handles the ADDITEMS opcode), PyObject_GetAttr is called and returns add_func on line 6660. PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so 2x calls to this function are added (compare to do_append function in the same file).

Pull request was made at #121136

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions