She is not and should not get in any trouble. If anything the decision should be celebrated, as long as we’re talking about a safe dropoff at a hospital or other safe haven.
The child will go from a mother who was in a situation so bad she was willing to give up her baby, to most likely a couple that’s been waiting years to adopt and are dying to be parents.