Felipe Contepomi missed the conversion. Four minutes later the Reds were back level when Poutusi Luafutu crossed over.
Leinster regained the lead after a spell of pressure when Shane Horgan capped off some excellent work from Contepomi after 26 minutes.
Recently named vice captain Shane Jennings was next on the scoresheet after a good drive into the Wesley End of the ground to give the hosts a 15-5 lead.
Credit to the lads who never let their heads drop and first Aidan Toua (34 mins) and Digby Ioane (38) crossed over, with out-half Ben Gollings adding both conversions.
Then in injury time Cian Healy scooped the ball to pile over the line, with Argentina's Contepomi adding the points, to give Leinster a narrow 22-19 advantage.
The game ebbed and flowed and it was Rob Kearney who was the opening try scorer of the second half when he capped off a fine move involving the impressive Brian O'Driscoll to gather a kick and chase and spin clear of the Reds defence.
Contepomi converted and the floodgates opened with Contepomi (64), substitute Sean O'Brien (79) and Leinster's most capped player Malcolm O'Kelly getting on the scoresheet.
It was a good workout played in front of a near capacity Donnybrook ahead of the start of the Magners League title defence next weekend away to Cardiff.
15: Isa Nacewa (Fergus McFadden, 65)
14: Shane Horgan (Gary Brown, 72)
12: Felipe Contepomi
11: Rob Kearney (Simon Keogh, 72)
10: Jonathan Sexton
9: Chris Whitaker CAPTAIN (Chris Keane, 63)
1: Cian Healy (Jamie Hagan, 58)
2: Bernard Jackman (John Fogarty, 18)
3: Ronan McCormack (Brian Blaney, 72)
4: Malcolm O'Kelly
5: Devin Toner (Trevor Hogan, 58)
6: Cameron Jowitt (Stephen Keogh, 52)
7: Shane Jennings (Sean O'Brien, 61)
8: Jamie Heaslip