If you paid him for the work there's no reason to be shy about how you feel about the results. If he did it for free you probably shouldn't be too hard on him. Definitely let him know what the coding mistake was, but do it nicely. He'll probably be so embarrassed about the mistake and the time it wasted that he'll know he's done something terribly wrong without you yelling at him too.
in reply to OT - How to deal with coders who don't do what they should