@@ -78,10 +78,10 @@ void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self,
7878 // verify that the matrix is big enough
7979 mp_get_index (mp_obj_get_type (self -> framebuffer ), self -> bufinfo .len , MP_OBJ_NEW_SMALL_INT (self -> bufsize - 1 ), false);
8080 } else {
81- _PM_FREE (self -> bufinfo .buf );
82- _PM_FREE (self -> protomatter .rgbPins );
83- _PM_FREE (self -> protomatter .addr );
84- _PM_FREE (self -> protomatter .screenData );
81+ _PM_free (self -> bufinfo .buf );
82+ _PM_free (self -> protomatter .rgbPins );
83+ _PM_free (self -> protomatter .addr );
84+ _PM_free (self -> protomatter .screenData );
8585
8686 self -> framebuffer = NULL ;
8787 self -> bufinfo .buf = common_hal_rgbmatrix_allocator_impl (self -> bufsize );
@@ -164,13 +164,13 @@ void common_hal_rgbmatrix_rgbmatrix_deinit(rgbmatrix_rgbmatrix_obj_t* self) {
164164 free_pin (& self -> oe_pin );
165165
166166 if (self -> protomatter .rgbPins ) {
167- _PM_free (& self -> protomatter );
167+ _PM_deallocate (& self -> protomatter );
168168 }
169169 memset (& self -> protomatter , 0 , sizeof (self -> protomatter ));
170170
171171 // If it was supervisor-allocated, it is supervisor-freed and the pointer
172172 // is zeroed, otherwise the pointer is just zeroed
173- _PM_FREE (self -> bufinfo .buf );
173+ _PM_free (self -> bufinfo .buf );
174174 self -> base .type = NULL ;
175175
176176 // If a framebuffer was passed in to the constructor, NULL the reference
0 commit comments