It never once had a failure in flight, except for the short in Apollo 14, which they managed to hack around mid-flight. Cool story: http://www.ibiblio.org/apollo/#Final_exam_for_the_advanced_s...
However there truly was never an unknown software bug discovered in flight. Lots of known software bugs had workarounds, partially because there was a hard deadline of about 4 months where the software couldn't be changed before the launch. Pretty amazing.