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

[eloquent] Fix memory leak in rcl_subscription_init()/rcl_publisher_init() (#794) #833

Merged
merged 2 commits into from
Oct 16, 2020

Conversation

jacobperron
Copy link
Member

@jacobperron jacobperron commented Oct 14, 2020

Backport #794 and #834 to Eloquent.

* Fix memory leak in rcl_subscription_init()/rcl_publisher_init()

In rcl_subscription_init(), while rmw_subscription_get_actual_qos()
return failure, created rmw subscription handle isn't freed.
In rcl_publisher_init(), while rmw_publisher_get_actual_qos()
return failure, created rmw publisher handle isn't freed.

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Remove codes on the cascading errors.

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Change code style

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Output error message to stderr

Signed-off-by: Barry Xu <barry.xu@sony.com>
Follow-up to #794.
rmw_get_error_string already formats the error with the file and line number.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron merged commit df14174 into eloquent Oct 16, 2020
@delete-merged-branch delete-merged-branch bot deleted the jacob/backport_eloquent_794 branch October 16, 2020 20:49
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