In class org.apache.karaf.jaas.modules.ldap.LDAPLoginModule, "DirContext.close()" and "NamingEnumeration.close()" are not called in all cases.
Although it is not mandatory, it would be better to call it in all cases (to be sure, in a "finally" block).
Otherwise, this leaves one "com.sun.jndi.ldap.Connection" thread running for each LDAP request. After several minutes, the thread disappears automatically.
During a performance test with 10 concurrent users, this creates up to several hundreds of such threads.