Skip to content

tests: fix linked list leaks#782

Merged
hefloryd merged 1 commit intoOpenEtherCATsociety:masterfrom
JohannesKauffmann:fix-simple_ng-leak
Apr 8, 2025
Merged

tests: fix linked list leaks#782
hefloryd merged 1 commit intoOpenEtherCATsociety:masterfrom
JohannesKauffmann:fix-simple_ng-leak

Conversation

@JohannesKauffmann
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

ping @ArthurKetels @nakarlsson

@JohannesKauffmann
Copy link
Copy Markdown
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
Copy Markdown
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