Double-Check Your Error Paths
Code in error paths is often not well tested and doesn't always clean up all objects, including locks or allocated memory. I cover this in a little more detail in Chapter 19, Security Testing.