Skip to content

Commit

Permalink
fatfs_vfs: fix the Memory leak: work
Browse files Browse the repository at this point in the history
Signed-off-by: zengwei zengwei1@uniontech.com
zengwei00 committed Dec 26, 2023
1 parent 724e6e0 commit 1fd2eef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/fatfs/fatfs_vfs/fatfs_vfs.c
Original file line number Diff line number Diff line change
@@ -90,6 +90,9 @@ static int _format(vfs_mount_t *mountp)

/* make sure the volume has been initialized */
if (_init(mountp)) {
#if !CONFIG_FATFS_FORMAT_ALLOC_STATIC
free(work);
#endif
return -EINVAL;
}

0 comments on commit 1fd2eef

Please sign in to comment.