The try came at the end of six minutes of stoppage time in which the Saints had battered away for no reward, but on the balance of play they just about deserved the seven points that brought the win in Dublin.
Saints had started the brighter, putting the ball through the hands and maintaining possession. And they got their reward with just six minutes gone, Rotimi Segun scything through a gap before combining with Josh Skelcey to put George Wacokecoke over in the corner.
It was a superb try, which Leinster came close to emulating seven minutes later, full back Andy Marks pulled back when the scoring pass went forward. It proved to be a crucial error as from the scrum Saints ran the ball, Segun again making a great break from outside centre to put Howard Packman away.
The full back turned Marks inside out on his way to the line, and with Sam Olver landing both touchline conversions despite a strong wind Saints had a healthy 14-0 lead.
That the score remained the same until half-time owed a great deal to the defence of both teams. Leinster's pack were denied a try by some outstanding mauling from the Saints, who in turn ended the first half camped on the home line.
But twice their rolling mauls were stopped, and twice more the ball was stripped from the runner at crucial times. A promising first attack of the second half also yielded nothing, and, no doubt buoyed, Leinster hit back, making the most of Oli Lamprell's yellow card to score 10 unanswered points, centre Fergal Cleary going over for a try and scrum-half Joey Carbery landing the conversion and a penalty.
Carbery also missed from long range following a lengthy stoppage break for prop Ntinga Mpiko to receive treatment and be stretchered off, and with Saints having lost the accuracy of the first half it seemed only a matter of time before the province were in front.
It took 10 minutes for this to happen, with fly half Mark Sutton sending a chip into space to create a try for wing Cillian Burke, and with Cleary's conversion Leinster were in front for the first time.
However there were still six minutes to play, more than enough for Mallinder to make his mark.
LEINSTER U19 - Marks; Leavy, Brennan, Cleary, Burke; Sutton, Carbery; Loughman, Roche, Mpiko, Dwan, Joyce Ahearne, Purcell, Oliver, Timoney
Reps - O'Sullivan, Walsh, Phelan, Doyle, Penny, Thornton, Schmidt, Courtney, Vallejo
SAINTS U19 - Packman; Wacokecoke, Segun, Mallinder, Skelcey; Olver, Lee-Everton; Morley, Marshall, Lamprell. Peters, Onojaife, Betts, Harry, Lyons
Reps - Fish, Peck, Jeannot, Marshall, Conner, Pointon, Furbank, Cooke, Bullivant
4mins SAINTS Miss pen Olver
6mins SAINTS Try Wacokecoke Con Olver 0-7
14mins SAINTS Try Packman Con Olver 0-14
35+2mins SAINTS Miss DG Olver
HALF-TIME LEINSTER U19 0 SAINTS U19 14
39mins SAINTS Yellow card Lamprell
40mins LEINSTER Pen Carbery 3-14
43mins LEINSTER Try Cleary Con Carbery 10-14
59mins LEINSTER Miss pen Carbery
69mins LEINSTER Try Burke Con Cleary 17-14
70+6mins SAINTS Try Mallinder Con Mallinder 17-21
FULL-TIME LEINSTER U19 17 SAINTS U19 21