You have to consider where slaves come from in the first place.
Most of the time in these settings, if you buy all the slaves, you've just funded the slaver's next expedition to attack an innocent farming village somewhere, killing half the villagers and selling the rest into slavery.
(Which is heinous by itself, but it is also a net loss to the economy of the country and it will drive up market prices.)
In such a case, the correct choice IMO is to kill the slaver and free the slaves, because it decreases the average profitability of slaving and increases the average profitability of being a farmer.
(Whether or not the freed slaves die afterwards is a separate issue; the important part is killing the slaver, so that fewer people become slaves in the future.)
Now, if you have some sort of debt slavery or criminal slavery system, the morality is more on the neutral side - slavery is usually preferable to imprisonment in these settings - but realistically there will always be people who abuse such systems, and in most settings it would be preferable if the option 'drive someone into debt to make them a slave' simply didn't exist.
A parting thought: a fantasy setting, there might be a provable afterlife system in place, and so death might in fact be better than either slavery or imprisonment...