Southwest Airlines posted a profit in the fourth quarter as bookings during the holidays were better than expected.