How to use a flyback diode on a +/-12V motor
This question is very like Snubber diodes for a DC Motor with 2 relays but may turn out to be different when you supply the missing information - your switching arrangement.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Possibly the schematic of OP's circuit.







simulate this circuit

Figure 2. Using snubber diodes. In this configuration the maximum voltage that can appear across the contacts is 12 V + 2 x 0.7 V = 13.4 V.







simulate this circuit

Figure 3. Back to back Zener diodes. Zener diode voltage should be a few volts above supply voltage to prevent turn on or high leakage around the knee voltage.

The solution of Figure 3 is probably the most elegant as it uses only two components which can be placed at the motor and requires no additional wiring.

The snubber diodes or Zener diodes must be rated at full motor current as that is what will be diverted through them when the motor is switched.