Skip to content

Commit 6847e15

Browse files
authored
Fix failed in loading wasm byte-code if return NULL while size == 0 in os_malloc (#500)
1 parent 240ca2e commit 6847e15

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

core/shared/platform/rt-thread/rtt_platform.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ void *os_malloc(unsigned size)
2828
void *buf_fixed;
2929
rt_ubase_t *addr_field;
3030

31-
if (size == 0)
32-
{
33-
return RT_NULL;
34-
}
3531
buf_origin = rt_malloc(size + 8 + sizeof(rt_ubase_t));
3632
buf_fixed = buf_origin + sizeof(void*);
3733
if ((rt_ubase_t)buf_fixed & 0x7)

0 commit comments

Comments
 (0)