mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(fatfs): fix a memory leak bug when FF_USE_DYN_BUFFER was enabled
BDL diskio test part only; the rest of the commit is already on release/v6.0 via4f7b1af0f9, which predates components/fatfs/test_apps/bdl. (cherry picked from commita8b5b8d582)
This commit is contained in:
@@ -80,9 +80,15 @@ TEST_CASE("(BDL) diskio register, format, write and read on partition", "[fatfs]
|
||||
TEST_ASSERT_EQUAL(FR_OK, f_mkfs(drv, &opt, work_area, sizeof(work_area)));
|
||||
|
||||
FATFS fs;
|
||||
#if FF_USE_DYN_BUFFER
|
||||
fs.win = NULL;
|
||||
#endif
|
||||
TEST_ASSERT_EQUAL(FR_OK, f_mount(&fs, drv, 1));
|
||||
|
||||
FIL file;
|
||||
#if !FF_FS_TINY && FF_USE_DYN_BUFFER
|
||||
file.buf = NULL;
|
||||
#endif
|
||||
UINT bw;
|
||||
TEST_ASSERT_EQUAL(FR_OK, f_open(&file, "test.txt", FA_OPEN_ALWAYS | FA_READ | FA_WRITE));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user