This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new a1e87c6  [AMQ-6833] Cleanly close DirContext in LDAPLoginModule when 
the authentication is complete
     new 6e65084  Merge pull request #476 from jbonofre/AMQ-6833
a1e87c6 is described below

commit a1e87c60963d7ac736aad01786dc6026fe2c3ac3
Author: jbonofre <[email protected]>
AuthorDate: Wed Feb 26 18:24:53 2020 +0100

    [AMQ-6833] Cleanly close DirContext in LDAPLoginModule when the 
authentication is complete
---
 .../src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java       | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java 
b/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
index dced7ce..aad8f50 100644
--- a/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
+++ b/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
@@ -332,6 +332,10 @@ public class LDAPLoginModule implements LoginModule {
             throw ex;
         }
 
+        if (context != null) {
+            close(context);
+        }
+
         return true;
     }
 

Reply via email to