Rule reminder
Gli and le BOTH become glie- (never 'gli lo', 'le la', 'lo gli', etc.). Glie- combines with the direct pronoun into ONE word: glielo, gliela, glieli, gliele, gliene.
How do you say 'I gave it (m.) to him'?