This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 582693f2cebc2c23c44b6e5beae90037990eb21c Author: zhaoxingyu1 <[email protected]> AuthorDate: Wed Nov 12 15:46:50 2025 +0800 fs/smartfs: change fs_heap to lib_tempbuffer Replace fs_heap_malloc/free with lib_get_tempbuffer/lib_put_tempbuffer in smartfs_finddirentry(). This aligns smartfs with the common VFS tempbuffer allocation pattern and is a prerequisite for the canonicalization cleanup that removes redundant ".." handling from individual filesystem layers. Signed-off-by: zhaoxingyu1 <[email protected]> --- fs/smartfs/smartfs_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/smartfs/smartfs_utils.c b/fs/smartfs/smartfs_utils.c index c132deaa843..7024f0e0229 100644 --- a/fs/smartfs/smartfs_utils.c +++ b/fs/smartfs/smartfs_utils.c @@ -1918,7 +1918,7 @@ int smartfs_extendfile(FAR struct smartfs_mountpt_s *fs, * will, unfortunately, need to allocate one. */ - buffer = fs_heap_malloc(SMARTFS_TRUNCBUFFER_SIZE); + buffer = (FAR uint8_t *)lib_get_tempbuffer(SMARTFS_TRUNCBUFFER_SIZE); if (buffer == NULL) { return -ENOMEM; @@ -2115,7 +2115,7 @@ errout_with_buffer: #ifndef CONFIG_SMARTFS_USE_SECTOR_BUFFER /* Release the allocated buffer */ - fs_heap_free(buffer); + lib_put_tempbuffer((FAR char *)buffer); #endif /* Restore the original file position */
