Skip to content

Fix crash when error scanning ethercat slaves #56

@toliver

Description

@toliver

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions