diff options
author | Tomas Babej <tbabej@redhat.com> | 2014-04-01 12:48:57 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-04-08 14:23:18 +0200 |
commit | 5a0d52b9393a2a4f154aca617855cba3f83e989b (patch) | |
tree | 5aefb02bc35912a340ac4f4ea85f22ccceb4f358 /daemons | |
parent | 2b171d273f3dd7b4b059d15facb0ac86fb07ca9f (diff) | |
download | freeipa-5a0d52b9393a2a4f154aca617855cba3f83e989b.tar.gz freeipa-5a0d52b9393a2a4f154aca617855cba3f83e989b.tar.xz freeipa-5a0d52b9393a2a4f154aca617855cba3f83e989b.zip |
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
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c index c6e7509bb..def312ca8 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c @@ -1414,6 +1414,7 @@ static int ipapwd_pre_bind(Slapi_PBlock *pb) /* Try to do OTP first. */ syncreq = sync_request_present(pb); if (!syncreq && !ipapwd_pre_bind_otp(dn, entry, credentials)) { + slapi_entry_free(entry); slapi_send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL, NULL, 0, NULL); return 1; |