circuit drive dual motor l298
Since the current rating of the motor is exactly equal to the maximum rating of the L298, you must include current limiting, to make sure the current never gets above that. It could happen because of a variation in the 24V power and mostly at motor startup.
To implement current limiting, insert a low resistor in series with pin 15 and compare the voltage across it with a reference voltage. The output of the comparator should be used to drive the Enable pin (11). So the motor current will be limited to 3A. For example, using a 0.1Ω resistor you would only lose 0.3V across it at 3A and your reference should be, of course, 0.3V.
Take a look at the circuit. It will chop the motor voltage, causing the maximum average motor current to stay at about 3A. The switching frequency can be adjusted by changing C2. The rest of the circuit stays as you have it, with diodes and everything.
I think the diodes you used are OK.