I am a Roman citizen captured by pirates and sold into slavery in Corinth. Lucius Mummius and his army have just entered the city (and will go on to destroy it): what's going to happen to me?
You would be liberated. It's established in Roman law that unlawful sales of freeborn citizens were legally null and void even if the enslaved person had been wrongfully enslaved for a significant period of time.
Assuming you aren't killed in the chaos of taking the city, of course.