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

uxrce_dds_client - Fix nullptr access in certain cleanup situations #23913

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

alexcekay
Copy link
Member

Solved Problem

When the uxrce_dds_client is not able to connect it cleans up the current session and retries the connection after a certain time. This works well in most cases, but in certain situations the connection fails even before a session is created. This will cause a nullptr access when trying to clean a session that is not yet created.

Solution

Only clean the session if it has been created.

Changelog Entry

For release notes:

Bugfix uxrce_dds_client - Fix nullptr access in certain cleanup situations

Test coverage

  • Has been tested on the bench

@alexcekay alexcekay requested a review from niklaut November 8, 2024 16:50
@alexcekay alexcekay marked this pull request as ready for review November 11, 2024 08:17
Copy link
Contributor

@niklaut niklaut left a comment

Choose a reason for hiding this comment

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

Good catch!

@alexcekay alexcekay merged commit fbbfcdb into main Nov 11, 2024
51 of 56 checks passed
@alexcekay alexcekay deleted the pr-dds-secure-delete branch November 11, 2024 13:23
mrpollo pushed a commit that referenced this pull request Nov 12, 2024
…23913)

* Only close initialized objects

* Added err log in case of no ping

* Added err log in case of timesync timeout
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