Custody of child

My cousin had a love marriage in 2010. She gave birth to her daughter in Jan, 2015. Since her marriage she was staying with her husband and in-laws. After marriage my sister was denied the basic rights like following her own religious faith or having food of her preference or watching her favorite channels. Even she was not allowed to visit her parents as she wished. She wanted to work from home or join a job. Everytime she expressed her situation and wish to her husband she was said that she must keep mum now as she is not having a child. Her husband's job is also not well paid and is difficult to sustain a normal life with no scope of progress. She tried and asked him many times to look for a better job and move out of the place. But he never made a genuine try.Finding herself in such a situation and with broken heart, in the 2nd year of her marriage, she confided herself to a chat friend whom she never met. This friend shared a similar wavelength with her and used to encourage her a lot to overcome the situation through positive thinking. However, soon some sort of emotional dependency developed on either side. Gradually some sexual discussion followed (all through text messages as they have never met each other in person). All these spanned for 3 - 4 months. She being aware of doing wrong was also trying to come out of the relation. At that point her husband came to know about it. My sister admitted her fault and promised never to indulge in such things. However, the behaviour of his or his parents' did not change. Gradually, her family members were also being targeted in terms of abusive comments made in front of her. Visit to her parents also decreased to yearly once. After all these she conceived her child.During pregnancy also she was either denied of her food preferences or was served stale or rotten food (to such an extent that she got an infection from the food and had to take medicines). Even at this stage her husband stood by his family saying it is unintentional. After the child birth, the condition was worse . Both mother and child was loosing weight fast. Then after a month she came to her parents to stay and went back after 4 months. Stale and unhygienicly prepared food was also served for the baby now by her mother-in-law. Her husband made aware of the same, maintained his logic of 'being unintentional mistake'. Finally, she decided to leave her in-laws place and came to stay with her parents. She is not having any intention of divorce and only want his husband to accept and raise voice against the unjustice towards her and their child. But, rather than trying to support or solve the issue her husband is threatening to claim for the custody of the child on the ground of she being a 'Character less woman'. My question is if it comes down to a custody battle, would he be able to get custody of the baby on this ground? Also on what other grounds can they claim the custody of the child and what area the chances that they can get it.