Carley punished Gloucester wing David Halaifonua for a deliberate knock-on as Saints sent the ball out to the left.
Halaifonua was sin-binned during the incident that came six minutes from time and Stephen Myler slotted the conversion to secure a gritty 13-12 Aviva Premiership success.
And when asked whether he felt Saints were lucky to be awarded the penalty try, Mallinder said: “No, we were going to score.
“It was a clear overlap so it was the only decision the referee could make.”
And he added: “I’m very pleased with the win. It was a bit of a dogfight out there, not a pretty game, but very competitive.
“We decided to go into a breeze and up the hill in the first half and we were disappointed to be nine points down at half-time, but we knew we’d still be in the game playing down the hill and so it proved.”
Myler’s match-winning conversion came on his 300th appearance for Saints.
And Mallinder said: “It’s a tremendous achievement, 300 appearances in this professional era.
“Players now move around a lot more and you’re not getting players reaching the milestones that they used to do.
“He’s been a fantastic servant for the club and hopefully he’ll continue to do that in the future.”