From 99d3a73d590d9e2a15e7e2bcf908e87abb6f24f6 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 9 Jun 2022 11:58:00 +0200 Subject: [PATCH] nrf/modules/uos/microbitfs: Fix MICROPY_MBFS build to use mp_obj_malloc. Changes introduced in 0e7bfc88c6ac6b5d64240f91183a3cfe2ab67ade missed changing this call to mp_obj_malloc. --- ports/nrf/modules/uos/microbitfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/modules/uos/microbitfs.c b/ports/nrf/modules/uos/microbitfs.c index 98752ad9ae..6c8ffb0925 100644 --- a/ports/nrf/modules/uos/microbitfs.c +++ b/ports/nrf/modules/uos/microbitfs.c @@ -360,7 +360,7 @@ STATIC file_descriptor_obj *microbit_file_open(const char *name, size_t name_len } STATIC file_descriptor_obj *microbit_file_descriptor_new(uint8_t start_chunk, bool write, bool binary) { - file_descriptor_obj *res = m_new_obj(file_descriptor_obj, binary ? &uos_mbfs_fileio_type : &uos_mbfs_textio_type); + file_descriptor_obj *res = mp_obj_malloc(file_descriptor_obj, binary ? &uos_mbfs_fileio_type : &uos_mbfs_textio_type); res->start_chunk = start_chunk; res->seek_chunk = start_chunk; res->seek_offset = file_system_chunks[start_chunk].header.name_len+2;