Ibrahim (may Allah have mercy on him) says: The mukatabah may sell her child to be freed, using it to help with her kitabah. But the view of Qadi Shurayh (may Allah have mercy on him) was more preferable to Sufyan (may Allah have mercy on him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المكاتب / 21701