(ITS#6145) Resource leaks shown when running cppcheck against openldap