8301760: Fix possible leak in SpNegoContext dispose

Reviewed-by: weijun
This commit is contained in:
Yuri Nesterenko 2023-02-06 07:08:35 +00:00
parent b4cb6c8e8b
commit 3f3356bcbd

View File

@ -243,8 +243,11 @@ public class SpNegoContext implements GSSContextSpi {
}
public final void dispose() throws GSSException {
mechContext = null;
state = STATE_DELETED;
if (mechContext != null) {
mechContext.dispose();
mechContext = null;
}
}
/**