You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few things are wrong with `network_socket_receive_from`:
- We claim `unclaimedBuffer` but don't unclaim it on error paths, thus
leaking the buffer.
- The `check_pointer` for `port` is done on `address`, likely due to a
copy/paste issue.
- The `if (received > 0)` before setting `buffer` is redundant as we
already checked this a few lines earlier.
- We don't document that the UDP packet will be dropped if an error
occurs in this function (timeout, permissions, etc.).
- The documentation of error codes is incomplete.
Address all these issues.
Signed-off-by: Hugo Lefeuvre <[email protected]>
0 commit comments