This story is from Brahm Vaivart Puran. Lord Vishnu took the form of Vaman and went to demon king Bali. He was looking of very young age, and his bodily effulgence was attracting everybody. When Bali's daughter Ratnamala saw him, then motherly feelings came to her heart. She thought, "If this child had been my son, I would have fed him my milk."
Later, when Vaman took a huge form and took everything from Bali, then Ratnamala got angry. She could not tolerate somebody taking away everything from her father. Out of anger she thought, "If he had been my son, I would have given him poison."
Lord Vishnu fulfilled both wishes of Ratnamala. During Krishna incarnation, Ratnamala was reborn as demoness Putana. She breastfed Krishna and while doing so, made Krishna drink poison.