Use NULL instead of 0 for pointers.
malloc will return NULL if it cannot allocate memory.
MFC after: 2 weeks.