Both barrel and pin-cushion distortion are pretty much impossible to correct in the darkroom.
The only way would be to have a lens that distorts the opposite way.
But fixing distortion that's related to perspective works fairly well.
But personally, I tend to leave things like they are and take distortion as a part of the image's look.