ros_ethercat icon indicating copy to clipboard operation
ros_ethercat copied to clipboard

Fix crash when error scanning ethercat slaves

Open toliver opened this issue 8 years ago • 0 comments

If the function exits here:

https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L116

then m_slave_handler pointed object is not instantiated here:

https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L121

And generates a segfault with malloc.c: No such file or directory when the destructor tries to delete it here:

https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L72

Probably we should check if (m_slave_handler) before deleting?

toliver avatar Oct 26 '16 19:10 toliver