summaryrefslogtreecommitdiff
path: root/stmhal/sdcard.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/sdcard.c')
-rw-r--r--stmhal/sdcard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/sdcard.c b/stmhal/sdcard.c
index 8c9febd9a..5686f949a 100644
--- a/stmhal/sdcard.c
+++ b/stmhal/sdcard.c
@@ -282,7 +282,7 @@ STATIC mp_obj_t sd_read(mp_obj_t self, mp_obj_t block_num) {
mp_uint_t ret = sdcard_read_blocks(dest, mp_obj_get_int(block_num), 1);
if (ret != 0) {
- m_free(dest, SDCARD_BLOCK_SIZE);
+ m_del(uint8_t, dest, SDCARD_BLOCK_SIZE);
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_Exception, "sdcard_read_blocks failed [%u]", ret));
}