You don't need a temporary pointer to malloc.