Added malloc and free.