FR 5316 then IB 1005 at Madrid
Rome → Madrid → Málaga
Timetable, Madrid time
16:05FR 5316 from Rome at the gate
15:40IB 1005 to Málaga leaves the gatealso CX 1814, LA 1836
23 h 35 apart on the timetable, overnight
IB 1005 leaves 23 h 35 after FR 5316 arrives on the timetable: more than half a day, so not a connection we count.