Walsh captured three wickets in the morning after the South Africans had been put in to bat on a seaming pitch in the second Test.
Walsh dispatched Herschelle Gibbs (2), Gary Kirsten (29) and Jacques Kallis (30).
His dismissal of Kirsten took the Jamaican fast-bowler to 384 Test wickets, one more than England's Ian Botham, who was in third place on the all-time list of Test wicket-takers before this match.
India's Kapil Dev is the leading wicket-taker on 434 with New Zealand's Richard Hadlee second on 431.