Updated to properly sanitize memory needed for the dynamically allocated locks