summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-slapi-plugins
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-03-24 14:18:54 -0400
committerRob Crittenden <rcritten@redhat.com>2011-03-28 14:50:59 -0400
commitbb9617f83867590eebef65e906f77094d1088afe (patch)
treee54b88a81342cdf2b1238fcfae375ac600ae04ff /daemons/ipa-slapi-plugins
parent446a4ca439820630764f77507682beea7e7ac886 (diff)
downloadfreeipa-bb9617f83867590eebef65e906f77094d1088afe.tar.gz
freeipa-bb9617f83867590eebef65e906f77094d1088afe.tar.xz
freeipa-bb9617f83867590eebef65e906f77094d1088afe.zip
Fix resource leaks.
Fixes: https://fedorahosted.org/freeipa/ticket/1119
Diffstat (limited to 'daemons/ipa-slapi-plugins')
-rw-r--r--daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c
index df1c171a0..1b6bc6f9c 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c
@@ -603,6 +603,7 @@ static int encode_ntlm_keys(char *newPasswd,
/* the lanman password is upper case */
upperPasswd = (char *)slapi_utf8StrToUpper((unsigned char *)newPasswd);
if (!upperPasswd) {
+ iconv_close(cd);
ret = -1;
goto done;
}
@@ -614,6 +615,7 @@ static int encode_ntlm_keys(char *newPasswd,
asciiPasswd = calloc(ol+1, 1);
if (!asciiPasswd) {
slapi_ch_free_string(&upperPasswd);
+ iconv_close(cd);
ret = -1;
goto done;
}