aboutsummaryrefslogtreecommitdiff
path: root/cc3200/mods/pybadc.c
diff options
context:
space:
mode:
Diffstat (limited to 'cc3200/mods/pybadc.c')
-rw-r--r--cc3200/mods/pybadc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc3200/mods/pybadc.c b/cc3200/mods/pybadc.c
index 9b882c033..03602e99b 100644
--- a/cc3200/mods/pybadc.c
+++ b/cc3200/mods/pybadc.c
@@ -111,7 +111,7 @@ STATIC mp_obj_t adc_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw,
}
// disable the callback before re-configuring
- pyb_obj_adc_t *self = m_new_obj(pyb_obj_adc_t);
+ pyb_obj_adc_t *self = m_new_obj_with_finaliser(pyb_obj_adc_t);
self->base.type = &pyb_adc_type;
self->channel = channel;
self->num = num;