]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix LDAP module leak on authentication error 1395/head
authorFeng Guo <gardonkoo@163.com>
Thu, 28 Nov 2024 13:32:37 +0000 (21:32 +0800)
committerGreg Hudson <ghudson@mit.edu>
Wed, 4 Dec 2024 19:47:48 +0000 (14:47 -0500)
In initialize_server(), unbind the server handle if authenticate()
fails.

[ghudson@mit.edu: rewrote commit message]

ticket: 9153 (new)

src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c

index 5e77d5e4984b719a4c7e1a7a27dec49e5121bc5a..d19e2b7611942550884ab0407ed84543abaab3a5 100644 (file)
@@ -189,6 +189,7 @@ initialize_server(krb5_ldap_context *ldap_context, krb5_ldap_server_info *info)
     if (ret) {
         info->server_status = OFF;
         time(&info->downtime);
+        ldap_unbind_ext_s(server->ldap_handle, NULL, NULL);
         free(server);
         return ret;
     }