summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/malloc_deferred.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/malloc_deferred.c')
-rw-r--r--cpukit/libcsupport/src/malloc_deferred.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c
index aab76406c7..b319d1213e 100644
--- a/cpukit/libcsupport/src/malloc_deferred.c
+++ b/cpukit/libcsupport/src/malloc_deferred.c
@@ -106,6 +106,10 @@ void *rtems_heap_allocate_aligned_with_boundary(
void *rtems_malloc( size_t size )
{
+ if ( size == 0 ) {
+ return NULL;
+ }
+
return rtems_heap_allocate_aligned_with_boundary( size, 0, 0 );
}
#endif