Skip to content

Commit

Permalink
libs/libc: Set errno when lib_get_tempbuffer() fails
Browse files Browse the repository at this point in the history
Signed-off-by: wangjianyu3 <[email protected]>
  • Loading branch information
JianyuWang0623 committed Jan 16, 2025
1 parent 118f827 commit 261e092
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/libc/misc/lib_tempbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ FAR char *lib_get_tempbuffer(size_t nbytes)
#ifdef CONFIG_LIBC_TEMPBUFFER_MALLOC
return lib_malloc(nbytes);
#else
set_errno(ENOMEM);
return NULL;
#endif
}
Expand Down

0 comments on commit 261e092

Please sign in to comment.