mirror of
https://github.com/apache/nuttx.git
synced 2026-09-24 00:42:03 +08:00
libs/lib_tempbuffer: set errno when fails
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
@@ -114,6 +114,7 @@ FAR char *lib_get_tempbuffer(size_t nbytes)
|
||||
#ifdef CONFIG_LIBC_TEMPBUFFER_MALLOC
|
||||
return lib_malloc(nbytes);
|
||||
#else
|
||||
_NX_SETERRNO(ENOMEM);
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user