what's the return value of malloc()
malloc returns a pointer to the allocated space if required memory is found, else, a null pointer is returned and 'errno' is set to indicate the error.