microsoft / ros_azure_iothub

This repository contains a ROS node for bidirectional communication with IoT Hub
38 stars 30 forks source link

[noetic] Fixing a recycled pointer accidentally used in subscribeTopic #28

Closed seanyen closed 3 years ago

seanyen commented 3 years ago

The topicName has shorter life cycle than the callback. Passing by pointer will cause the callback dereferencing a recycled pointer. This pull request is to make the lambda to capture the string copy instead.

ooeygui commented 3 years ago

Good catch!