mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-pwd-extop: Fix memory leak in ipapwd_pre_bind
We need to free the entry before returning from the function. https://fedorahosted.org/freeipa/ticket/4295
This commit is contained in:
parent
2b171d273f
commit
5a0d52b939
@ -1414,6 +1414,7 @@ static int ipapwd_pre_bind(Slapi_PBlock *pb)
|
|||||||
/* Try to do OTP first. */
|
/* Try to do OTP first. */
|
||||||
syncreq = sync_request_present(pb);
|
syncreq = sync_request_present(pb);
|
||||||
if (!syncreq && !ipapwd_pre_bind_otp(dn, entry, credentials)) {
|
if (!syncreq && !ipapwd_pre_bind_otp(dn, entry, credentials)) {
|
||||||
|
slapi_entry_free(entry);
|
||||||
slapi_send_ldap_result(pb, LDAP_INVALID_CREDENTIALS,
|
slapi_send_ldap_result(pb, LDAP_INVALID_CREDENTIALS,
|
||||||
NULL, NULL, 0, NULL);
|
NULL, NULL, 0, NULL);
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user