Commit 65d60f3a authored by yoogx's avatar yoogx
Browse files

* Adjust usage of unlock() to also protect len

        For openaadl/ocarina#104
parent 08fcaa1d
......@@ -237,10 +237,10 @@ int __po_hi_driver_sockets_send (__po_hi_task_id task_id,
len = write (__po_hi_c_sockets_write_sockets[remote_device], &(__po_hi_c_sockets_send_msg.content), size_to_write);
__po_hi_mutex_unlock (&__po_hi_c_sockets_send_mutex);
if (len != size_to_write)
__po_hi_mutex_unlock (&__po_hi_c_sockets_send_mutex);
__po_hi_monitor_report_failure_device (remote_device, po_hi_monitor_failure_value);
......@@ -252,6 +252,7 @@ int __po_hi_driver_sockets_send (__po_hi_task_id task_id,
__po_hi_mutex_unlock (&__po_hi_c_sockets_send_mutex);
request->port = __PO_HI_GQUEUE_INVALID_PORT;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment