mirror of
https://github.com/apache/nuttx.git
synced 2026-08-27 12:20:46 +00:00
net/can: repair callback alloc error handling
Release the corresponding resources held when the alloc fails Signed-off-by: wangjinjing1 <wangjinjing1@xiaomi.com>
This commit is contained in:
parent
a22f2a6123
commit
3bd4748bc3
1 changed files with 2 additions and 1 deletions
|
|
@ -377,7 +377,8 @@ ssize_t can_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
|||
/* A buffer allocation error occurred */
|
||||
|
||||
nerr("ERROR: Failed to allocate callback\n");
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_wrb;
|
||||
}
|
||||
|
||||
/* Set up the callback in the connection */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue