FR 9440 then FR 3682 at Lisbon
Madrid → Lisbon → Málaga
Timetable, Lisbon time
20:25FR 9440 from Madrid at the gate
15:10FR 3682 to Málaga leaves the gate
18 h 45 apart on the timetable, overnight
FR 3682 leaves 18 h 45 after FR 9440 arrives on the timetable: more than half a day, so not a connection we count.