UX 5038 then 3O 394 at Madrid
Málaga → Madrid → Casablanca
Timetable, Madrid time
22:20UX 5038 from Málaga at the gatealso AD 6930, AM 6974, EY 7535
16:503O 394 to Casablanca leaves the gate
18 h 30 apart on the timetable, overnight
3O 394 leaves 18 h 30 after UX 5038 arrives on the timetable: more than half a day, so not a connection we count.