Skip to content

_PyMem_FreeDelayed() missing a NULL pointer check #131719

Closed
@tom-pytel

Description

@tom-pytel

Bug report

Bug description:

Normally this is not a problem but if _PyMem_FreeDelayed(NULL) is called an (quite!) improbably high number of times in a single thread it can lead to memory exhaustion because the NULL is added to a queue. Fix is just to add a NULL check like _PyObject_XDecRefDelayed().

CPython versions tested on:

3.14

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions