summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/slab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/slab.c b/src/slab.c
index 490c1c0fcc..ffcdcb9cb3 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -233,7 +233,7 @@ void *rt_page_alloc(rt_size_t npages)
struct rt_page_head *b, *n;
struct rt_page_head **prev;
- RT_ASSERT(npages != 0);
+ if(npages == 0) return RT_NULL;
for (prev = &rt_page_list; (b = *prev) != RT_NULL; prev = &(b->next))
{