mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-26 20:53:11 +00:00
multi_heap: ensure that malloc(0) return NULL pointer in any poisoning configuration
This commit is contained in:
@@ -127,3 +127,10 @@ TEST_CASE("unreasonable allocs should all fail", "[heap]")
|
||||
TEST_ASSERT_NULL(test_malloc_wrapper(xPortGetFreeHeapSize() - 1));
|
||||
}
|
||||
|
||||
TEST_CASE("malloc(0) should return a NULL pointer", "[heap]")
|
||||
{
|
||||
void *p;
|
||||
p = malloc(0);
|
||||
TEST_ASSERT(p == NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user