Query regarding extra marital affair

I am male,38 from Kolkata. for last 7 months i have been emotionally involved with a married lady. she has a 4 years old child and her husband is partially mentally retired. the whole control including financial matters to everything in her family is controlled by her mother in law, who is a alzimers patient. her father in law spend most of the day time of the day outside spending time by chatting. both of her father in law and mother in law are reluctant about their son's treatment. she is married for last 8 years. we have a common friend circle. rfecently we came to know that she is a victim of domestic violence from the inception of her married life by her in laws and as well as other members outside family. recently our relation came up. now she has decided for legal separation. her in lwas doesnt want her to go for job or visit her poarents, as she got married without her parents' consent and later everything got settled. now she has decided for legal separation. she is scared as she might lose her son's custody as they will try to prove adultery against her. we never got physical. only proof against us is our watsapp chat. both of us do not want to loose the child, as a deep attachment has grew between me and the child. what to do now to be in safe side legally for both of us. please suggest