summaryrefslogtreecommitdiff
path: root/extmod/moduasyncio.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/moduasyncio.c')
-rw-r--r--extmod/moduasyncio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/extmod/moduasyncio.c b/extmod/moduasyncio.c
index 229a146c1..c4ee897c2 100644
--- a/extmod/moduasyncio.c
+++ b/extmod/moduasyncio.c
@@ -87,8 +87,7 @@ STATIC int task_lt(mp_pairheap_t *n1, mp_pairheap_t *n2) {
STATIC mp_obj_t task_queue_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
(void)args;
mp_arg_check_num(n_args, n_kw, 0, 0, false);
- mp_obj_task_queue_t *self = m_new_obj(mp_obj_task_queue_t);
- self->base.type = type;
+ mp_obj_task_queue_t *self = mp_obj_malloc(mp_obj_task_queue_t, type);
self->heap = (mp_obj_task_t *)mp_pairheap_new(task_lt);
return MP_OBJ_FROM_PTR(self);
}