From 821d0ac252f9c0f0c931e893ddc2865bbde6c22d Mon Sep 17 00:00:00 2001 From: prife Date: Tue, 22 Jan 2013 23:57:10 +0800 Subject: [PATCH] fix memory leak in sd_erase in bsp/simulator --- bsp/simulator/drivers/sd_sim.c | 1 + 1 file changed, 1 insertion(+) 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);