Skip to content

Commit

Permalink
add:flash_lfs_lf添加防护
Browse files Browse the repository at this point in the history
  • Loading branch information
Dozingfiretruck committed May 11, 2024
1 parent 37ed0b7 commit 10cb27a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/little_flash/luat_little_flash_lfs2.c
Expand Up @@ -49,6 +49,10 @@ typedef struct LFS2 {
}LFS2_t;

lfs_t* flash_lfs_lf(little_flash_t* flash, size_t offset, size_t maxsize) {
if (flash==NULL){
LLOGE("flash is null");
return NULL;
}
LFS2_t *_lfs = luat_heap_malloc(sizeof(LFS2_t));
if (_lfs == NULL)
return NULL;
Expand Down

0 comments on commit 10cb27a

Please sign in to comment.