Skip to content

Reference leak in ctypes._build_result() when numretvals > 1 and v == NULL #143145

@hyongtao-code

Description

@hyongtao-code

Bug report

Bug description:

_ctypes._build_result() leaks a reference to the result tuple when numretvals > 1 and v = NULL during result construction.
https://github.com/python/cpython/blob/main/Modules/_ctypes/_ctypes.c#L4559-L4562

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions