Skip to content

fix a memory leak in canopen_app_init #40

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

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

lvsoft
Copy link
Contributor

@lvsoft lvsoft commented Sep 3, 2023

storage & storageEntrie are created in stack and will be released after canopen_app_init, while registered in CO_storage_init. This is definitely a problem and wasted me 2 days.

@mdkendall
Copy link

This is a use-after-free bug rather than a leak, but it definitely is a problem.

@mlout
Copy link

mlout commented Sep 10, 2024

FWIW we also ran into this issue while implementing our flash storage driver. I have done the same fix in our branch here: #73

@MaJerle MaJerle merged commit ac995b1 into CANopenNode:master Sep 10, 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.

4 participants