If she's right, he gives it back. The crocodile plans on keeping the child because he assumes the woman will get the question wrong. He may want to eat the child, play with the child, adopt the child, etc, but they all hinge on the idea that he will keep the child. However, the woman guessing correctly means his plans have been interrupted. Plans aren't concrete, they're pure hypothetical intent.
If she's wrong (the crocodile doesn't plan to keep the child), the crocodile can just abandon the child in the middle of a swamp, or feed the child to another crocodile.
This all kind of hinges on how you define "keep" and "plan".