GSS-API Programming Guide

Deletion of Contexts and Stored Data

In the case where context establishment fails, Sun's implementation does not automatically delete “half-built” contexts. Applications should therefore handle this event by deleting the contexts themselves with gss_delete_sec_context().

Sun's implementation automatically releases stored data, such as internal names, through memory management. However, for good measure, applications should still call appropriate functions, such as gss_release_name(), when data elements are no longer needed.