When you malloc a memory or mmap a MAP_ANON memory, it is virtually
allocated. When you read or write to it, the process takes a page fault.
The page fault handler zeroes those memory and hands it to the process.
So I think there is no leak.
-Fredrick