It was real backs-to-the-wall stuff at Kings Park but Leinster were up for the battle and dug in for a fine victory.