diff options
Diffstat (limited to 'cpukit/libcsupport/src/malloc.c')
-rw-r--r-- | cpukit/libcsupport/src/malloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c index 795254fbab..3e55a94c83 100644 --- a/cpukit/libcsupport/src/malloc.c +++ b/cpukit/libcsupport/src/malloc.c @@ -30,6 +30,10 @@ void *malloc( { void *return_this; + if ( size == 0 ) { + return NULL; + } + return_this = rtems_heap_allocate_aligned_with_boundary( size, 0, 0 ); if ( !return_this ) { errno = ENOMEM; |