Skip to content

Commit

Permalink
Merge pull request kitodo#514 from stweil/fb
Browse files Browse the repository at this point in the history
Ldap: Fix resource leak
  • Loading branch information
henning-gerhardt authored Sep 22, 2016
2 parents 2b09653 + d5ed06a commit 5febdd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Goobi/src/de/sub/goobi/helper/ldap/Ldap.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ public boolean isUserPasswordCorrect(Benutzer inBenutzer, String inPasswort) {

if (ConfigMain.getParameter("ldap_AttributeToTest") == null) {
myLogger.debug("ldap attribute to test is null");
new InitialDirContext(env);
DirContext ctx = new InitialDirContext(env);
ctx.close();
return true;
} else {
myLogger.debug("ldap attribute to test is not null");
Expand Down

0 comments on commit 5febdd6

Please sign in to comment.