I had a co-worker leave our company recently. Before leaving, he coded a component that had a severe memory leak that caused a production outage (OutOfMemoryError in Java).  The problem was essentially a HashMap that grew and never removed entries, and the solution was to replace the HashMap with a cache implementation.

From a professional standpoint, I feel that I should let him know about the defect so he can learn from the error.  On the other hand, once people leave a company,  they often don't want to hear about legacy projects that they have left behind for bigger and better things.  

What is the general protocol for this sort of situation?

You don't hunt down a former collegue to tell him he made a mistake.  You may tell your friend that he made a mistake.

Whether he is a friend or a former collegue is up to you.
