summaryrefslogtreecommitdiff
path: root/extmod/modwebrepl.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/modwebrepl.c')
-rw-r--r--extmod/modwebrepl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/extmod/modwebrepl.c b/extmod/modwebrepl.c
index a8430bafb..63810447f 100644
--- a/extmod/modwebrepl.c
+++ b/extmod/modwebrepl.c
@@ -97,8 +97,7 @@ STATIC mp_obj_t webrepl_make_new(const mp_obj_type_t *type, size_t n_args, size_
mp_arg_check_num(n_args, n_kw, 1, 2, false);
mp_get_stream_raise(args[0], MP_STREAM_OP_READ | MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL);
DEBUG_printf("sizeof(struct webrepl_file) = %lu\n", sizeof(struct webrepl_file));
- mp_obj_webrepl_t *o = m_new_obj(mp_obj_webrepl_t);
- o->base.type = type;
+ mp_obj_webrepl_t *o = mp_obj_malloc(mp_obj_webrepl_t, type);
o->sock = args[0];
o->hdr_to_recv = sizeof(struct webrepl_file);
o->data_to_recv = 0;