summaryrefslogtreecommitdiff
path: root/extmod/moducryptolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/moducryptolib.c')
-rw-r--r--extmod/moducryptolib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/extmod/moducryptolib.c b/extmod/moducryptolib.c
index 6c89d6d9f..50cdbfa72 100644
--- a/extmod/moducryptolib.c
+++ b/extmod/moducryptolib.c
@@ -228,8 +228,7 @@ STATIC mp_obj_t ucryptolib_aes_make_new(const mp_obj_type_t *type, size_t n_args
mp_raise_ValueError(MP_ERROR_TEXT("mode"));
}
- mp_obj_aes_t *o = m_new_obj_var(mp_obj_aes_t, struct ctr_params, !!is_ctr_mode(block_mode));
- o->base.type = type;
+ mp_obj_aes_t *o = mp_obj_malloc_var(mp_obj_aes_t, struct ctr_params, !!is_ctr_mode(block_mode), type);
o->block_mode = block_mode;
o->key_type = AES_KEYTYPE_NONE;