mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 23:33:33 +08:00
Some error handling bugs noted by Ronen Vainish
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5122 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -220,7 +220,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb)
|
||||
/* Allocate the IO buffer */
|
||||
|
||||
stream->fs_bufstart = kmalloc(CONFIG_STDIO_BUFFER_SIZE);
|
||||
if (!stream)
|
||||
if (!stream->fs_bufstart)
|
||||
{
|
||||
err = ENOMEM;
|
||||
goto errout_with_sem;
|
||||
|
||||
Reference in New Issue
Block a user