UX 5042 then VY 1011 at Madrid
Málaga → Madrid → Barcelona
Timetable, Madrid time
09:50UX 5042 from Málaga at the gate
09:20VY 1011 to Barcelona leaves the gate
23 h 30 apart on the timetable, overnight
VY 1011 leaves 23 h 30 after UX 5042 arrives on the timetable: more than half a day, so not a connection we count.