Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
modbus_new_rtu Segmentation Fault when device argument is NULL #184
If the device argument to modbus_new_rtu is NULL, modbus_free is called on the context (src/modbus-rtu.c:1158).
Due to ctx->backend_data->device not having been malloc'd (this currently happens after the NULL device check), the free on line 1115 (src/modbus-rtu.c:1115) causes a segmentation fault.