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

Fixed a few memory leaks #1095

Closed
wants to merge 6 commits into from
Closed

Fixed a few memory leaks #1095

wants to merge 6 commits into from

Conversation

stickz
Copy link
Contributor

@stickz stickz commented Jul 4, 2021

Backports a few memory leak fixes from jesec/rtorrent .

Requires the following rakshasa/libtorrent pull request to be merged first. rakshasa/libtorrent#223

@afontenot afontenot mentioned this pull request Mar 9, 2022
@samad909
Copy link

This PR (used with rakshasa/libtorrent#223) seems to be causing issues when SCGI is using a socket (network.scgi.open_local) instead of a port (network.scgi.open_port). rTorrent crashes with,
munmap_chunk(): invalid pointer
Aborted


std::wstring result(buf);

free(buf);

Choose a reason for hiding this comment

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

@stickz On a cursory view, this makes no sense to me. Where do you see a memory leak? Moreover, buf is allocated on the stack, freeing it is an error.

@stickz
Copy link
Contributor Author

stickz commented Apr 7, 2023

I'm going to cherry pick these commits and create separate pull requests. This will allow @rakshasa to choose which ones to merge. Not all of these fixes are stable apparently. But they have a significant impact reducing software memory leaks.

@stickz stickz closed this by deleting the head repository Apr 13, 2024
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