FR 5383 then FR 7874 at Madrid
Valletta → Madrid → Palermo
Timetable, Madrid time
20:05FR 5383 from Valletta at the gate
13:30FR 7874 to Palermo leaves the gate
17 h 25 apart on the timetable, overnight
FR 7874 leaves 17 h 25 after FR 5383 arrives on the timetable: more than half a day, so not a connection we count.