Here is a little insight to help you understand why your dog may be freaking out on the leash.
Leash-reactive dogs tend to growl, bark, and/or lunge toward things that make them nervous or fearful.
These triggers may be other dogs and/or people and can be narrowed to specifics such as children, men, people wearing hats, or male/female dogs.
Dogs that display these behaviors are not acting aggressive, they are trying to prevent a fight. They are trying to make the threat go away or increase the distance between themselves and the threat- there are times when the dogs want to decrease the distance between themselves and another dog due to the frustration of wanting to greet and play. This is usually over-friendly, rude and invasive dogs that have never been taught manners and are dog park or daycare regulars.
If you see a dog reacting to you, the best thing you can do is give him space. Do not approach in an attempt to greet him.