Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topology: fix memleak in listchannels #5865

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

whitslack
Copy link
Collaborator

local_connected allocates a struct node_map off of the struct listchannels_opts but fails to ever release the internal table, so those table allocations hang around forever. Add node_map_clear as a destructor for the struct node_map to ensure that the internal table is freed when the enclosing struct is freed.

local_connected allocates a struct node_map off of the struct
listchannels_opts but fails to ever release the internal table, so those
table allocations hang around forever. Add node_map_clear as a
destructor for the struct node_map to ensure that the internal table is
freed when the enclosing struct is freed.

Changelog-Fixed: topology: Fixed memleak in `listchannels`
Signed-off-by: Matt Whitlock <[email protected]>
Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 896cf67

@rustyrussell
Copy link
Contributor

This is correct, good find! I thought I'd changed our hash tables to all use tal, but I had actually not put up a PR for those.

I'll apply this, then rebase that on top!

@rustyrussell rustyrussell merged commit 9d5eab1 into ElementsProject:master Jan 3, 2023
@whitslack whitslack deleted the topology-memleak branch February 5, 2023 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants