Skip to content

Commit

Permalink
Merge pull request #20206 from zengwei2000/patch-4
Browse files Browse the repository at this point in the history
fatfs_vfs: fix the Memory leak: work
  • Loading branch information
benpicco authored Dec 26, 2023
2 parents 7c2f091 + 1fd2eef commit 26682d8
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
Expand Up @@ -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;
}

Expand Down

0 comments on commit 26682d8

Please sign in to comment.