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

Fix subscriber's chunk leak in shm_monitor when unknown chunk type is retrieved from iceoryx #1941

Merged

Conversation

ksuszka
Copy link

@ksuszka ksuszka commented Mar 9, 2024

This MR fixes a memory leak in shm_monitor in release/0.10.4 in the receive_data_wakeup_handler function.

Typical flow in this function is:

  • retrieve chunk from iceoryx link
  • wrap this chunk into ddsi_serdata structure link
  • prepare it for processing
  • release reference to ddsi_serdata structure so chunk will be released from iceoryx when ddsi_serdata wrapper won't be needed link

However in some cases if chunk type is not recognized it is not wrapped into ddsi_serdata strcture and currently it is never released. This MR fixes this execution path.

This seems to fix ros2/rmw_cyclonedds#471 for me.

@ksuszka
Copy link
Author

ksuszka commented Mar 11, 2024

I've just noticed it was already fixed on master in f4ea4fc 2 years ago, however it was not back-ported to release 0.10.x which is currently in use in ROS2 Humble.

Could you make a backport of this fix to release 0.10.x so it is fixed in the next update of ROS Humble?

Copy link
Contributor

@eboasson eboasson left a comment

Choose a reason for hiding this comment

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

LGTM, and I agree this is a fix that needs to be easily available for Humble. Thanks!

@eboasson eboasson merged commit 84b8713 into eclipse-cyclonedds:releases/0.10.x Mar 11, 2024
12 of 18 checks passed
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.

None yet

2 participants