Valdes replaced Iker Casillas at half-time but was then forced off with 13 minutes remaining after complaining of a strain in his right calf.
The Barca goalkeeper will undergo tests when he returns to his club on Wednesday, although the early diagnosis suggests he suffered a tear.
A medical statement on the Spanish football federation’s website read:
“Victor Valdes, possible calf tear of the right leg. This Wednesday he will have new tests at his club to determine the exact extent of the injury. The national team doctors treated the goalkeeper immediately after he retired from the game in the 77th minute.
“They have determined that he could have suffered a torn calf in the right leg. Valdes was injured after going to clear the ball in a dangerous South Africa counter-attack.”
Valdes has been brilliant for Barcelona with a save percentage that puts him amongst the top five goalkeepers in Europe. With Champions League matches resuming next week, losing Valdes for an extended period of time will be a big blow for Barca, especially with Atletico Madrid only 3 points behind in the table.