mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-21 20:55:26 +08:00
fix memory leak in sd_erase in bsp/simulator
This commit is contained in:
parent
d7f8f375df
commit
821d0ac252
@ -203,6 +203,7 @@ int sd_erase(void)
|
|||||||
{
|
{
|
||||||
rt_sdcard_write(device, index, buffer, SECTOR_SIZE);
|
rt_sdcard_write(device, index, buffer, SECTOR_SIZE);
|
||||||
}
|
}
|
||||||
|
rt_free(buffer);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
FINSH_FUNCTION_EXPORT(sd_erase, erase all block in SPI flash);
|
FINSH_FUNCTION_EXPORT(sd_erase, erase all block in SPI flash);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user