W4 7542 then FR 5897 at Madrid
Málaga → Madrid → Torino
Timetable, Madrid time
09:15W4 7542 from Málaga at the gate
07:20FR 5897 to Torino leaves the gate
22 h 05 apart on the timetable, overnight
FR 5897 leaves 22 h 05 after W4 7542 arrives on the timetable: more than half a day, so not a connection we count.