summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorprife <[email protected]>2013-01-22 23:57:10 +0800
committerprife <[email protected]>2013-01-22 23:57:10 +0800
commit821d0ac252f9c0f0c931e893ddc2865bbde6c22d (patch)
treeda6afa66e009f81178aa9245858877ffb4a13063 /bsp
parentd7f8f375df4771045ffa13f9252ad1b25786a4ae (diff)
fix memory leak in sd_erase in bsp/simulator
Diffstat (limited to 'bsp')
-rwxr-xr-xbsp/simulator/drivers/sd_sim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bsp/simulator/drivers/sd_sim.c b/bsp/simulator/drivers/sd_sim.c
index a01b275593..758b5e0417 100755
--- a/bsp/simulator/drivers/sd_sim.c
+++ b/bsp/simulator/drivers/sd_sim.c
@@ -203,6 +203,7 @@ int sd_erase(void)
{
rt_sdcard_write(device, index, buffer, SECTOR_SIZE);
}
+ rt_free(buffer);
return 0;
}
FINSH_FUNCTION_EXPORT(sd_erase, erase all block in SPI flash);