@@ -74,7 +74,7 @@ STATIC void *realloc_ext(void *ptr, size_t n_bytes, bool allow_move) {
74
74
void * m_malloc (size_t num_bytes ) {
75
75
void * ptr = malloc (num_bytes );
76
76
if (ptr == NULL && num_bytes != 0 ) {
77
- return m_malloc_fail (num_bytes );
77
+ m_malloc_fail (num_bytes );
78
78
}
79
79
#if MICROPY_MEM_STATS
80
80
MP_STATE_MEM (total_bytes_allocated ) += num_bytes ;
@@ -100,7 +100,7 @@ void *m_malloc_maybe(size_t num_bytes) {
100
100
void * m_malloc_with_finaliser (size_t num_bytes ) {
101
101
void * ptr = malloc_with_finaliser (num_bytes );
102
102
if (ptr == NULL && num_bytes != 0 ) {
103
- return m_malloc_fail (num_bytes );
103
+ m_malloc_fail (num_bytes );
104
104
}
105
105
#if MICROPY_MEM_STATS
106
106
MP_STATE_MEM (total_bytes_allocated ) += num_bytes ;
@@ -115,7 +115,7 @@ void *m_malloc_with_finaliser(size_t num_bytes) {
115
115
void * m_malloc0 (size_t num_bytes ) {
116
116
void * ptr = m_malloc (num_bytes );
117
117
if (ptr == NULL && num_bytes != 0 ) {
118
- return m_malloc_fail (num_bytes );
118
+ m_malloc_fail (num_bytes );
119
119
}
120
120
// If this config is set then the GC clears all memory, so we don't need to.
121
121
#if !MICROPY_GC_CONSERVATIVE_CLEAR
@@ -131,7 +131,7 @@ void *m_realloc(void *ptr, size_t new_num_bytes) {
131
131
#endif
132
132
void * new_ptr = realloc (ptr , new_num_bytes );
133
133
if (new_ptr == NULL && new_num_bytes != 0 ) {
134
- return m_malloc_fail (new_num_bytes );
134
+ m_malloc_fail (new_num_bytes );
135
135
}
136
136
#if MICROPY_MEM_STATS
137
137
// At first thought, "Total bytes allocated" should only grow,
0 commit comments