mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-12 16:32:01 -05: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:
1 parent
2b171d273f
commit
5a0d52b939
1 file changed
+1
@@ -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;
|
||||||
|
|||||||
Reference in new issue
Block a user