Calls to modbus slave functionality can result in resource leaks
I have begun using the slave side of libmodbus and have been reading the code to figure out the intended usage. I have noticed that in the function modbus_
I'm not sure what the intention of returning the listening socket back to user is. They can't call any API functions which could reuse this listening socket since subsequent calls to modbus_
Also I have noticed that this function calls exit(1) in several locations. I feel that it is a bad assumption that a user would want the process to exit if the socket can't create, bind or listen to incoming connections.
I wasn't sure if all of these were considered bugs, so I've posted it as a question instead. I am using the 2.0.3 source.
I can submit an official bug report with suggested patches if these are considered bugs
Thanks.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- libmodbus Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: