Skip to content

tests: fix linked list leaks #782

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

Conversation

JohannesKauffmann
Copy link
Contributor

@JohannesKauffmann JohannesKauffmann commented Jan 23, 2024

Don't overwrite the original pointer returned by ec_find_adapters(), otherwise the linked list is leaked. Instead, save original pointer to the head of the list use and adapters as a temporary variable. Pass the original pointer to ec_free_adapters().

For win32, ec_free_adapters() was missing entirely.

@JohannesKauffmann JohannesKauffmann changed the title simple_ng: fix linked list leak simple_ng/simple_test: fix linked list leak Jan 23, 2024
@JohannesKauffmann JohannesKauffmann changed the title simple_ng/simple_test: fix linked list leak tests: fix linked list leaks Jan 23, 2024
@JohannesKauffmann
Copy link
Contributor Author

ping @ArthurKetels @nakarlsson

@JohannesKauffmann
Copy link
Contributor Author

@hefloryd

Don't overwrite the original pointer returned by ec_find_adapters(),
otherwise the linked list is leaked. Instead, save original pointer to
the head of the list use and `adapters` as a temporary variable. Pass
the original pointer to ec_free_adapters().

For win32, ec_free_adapters() was missing entirely.
@hefloryd hefloryd merged commit 2f08b49 into OpenEtherCATsociety:master Apr 8, 2025
4 of 5 checks passed
@hefloryd
Copy link
Contributor

hefloryd commented Apr 8, 2025

Merged, thanks

@JohannesKauffmann JohannesKauffmann deleted the fix-simple_ng-leak branch April 9, 2025 11:37
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.

2 participants