mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix resource leaks.
Fixes: https://fedorahosted.org/freeipa/ticket/1119
This commit is contained in:
committed by
Rob Crittenden
parent
446a4ca439
commit
bb9617f838
@@ -603,6 +603,7 @@ static int encode_ntlm_keys(char *newPasswd,
|
|||||||
/* the lanman password is upper case */
|
/* the lanman password is upper case */
|
||||||
upperPasswd = (char *)slapi_utf8StrToUpper((unsigned char *)newPasswd);
|
upperPasswd = (char *)slapi_utf8StrToUpper((unsigned char *)newPasswd);
|
||||||
if (!upperPasswd) {
|
if (!upperPasswd) {
|
||||||
|
iconv_close(cd);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -614,6 +615,7 @@ static int encode_ntlm_keys(char *newPasswd,
|
|||||||
asciiPasswd = calloc(ol+1, 1);
|
asciiPasswd = calloc(ol+1, 1);
|
||||||
if (!asciiPasswd) {
|
if (!asciiPasswd) {
|
||||||
slapi_ch_free_string(&upperPasswd);
|
slapi_ch_free_string(&upperPasswd);
|
||||||
|
iconv_close(cd);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user