Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

hamt.c: sub_node leaked in bitmap_assoc and bitmap_without #150178

Copy link
Copy link
@lpyu001

Description

@lpyu001
Issue body actions

Bug report

Bug description:

Bug report

Bug description:

Parent issue :#146102
Glist:https://gist.github.com/devdanzin/332a120e4c7750e8a7aff47419311696

Two analogous bugs:

  1. hamt_node_bitmap_assoc (line 704): Recursive hamt_node_assoc returns new sub_node, then hamt_node_bitmap_clone fails → sub_node leaked. Line 755 correctly DECREFs.
  2. hamt_node_bitmap_without (line 997): Same pattern. Line 968 correctly DECREFs.

Fix:

Add Py_DECREF(sub_node) before return NULL/return W_ERROR

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.