]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
No need for request_free callback
authorNick Porter <nick@portercomputing.co.uk>
Thu, 7 Sep 2023 12:59:27 +0000 (13:59 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 8 Sep 2023 07:00:52 +0000 (08:00 +0100)
bind_auth_ctx is parented of the trunk request so is freed automatically

src/lib/ldap/connection.c

index 75fbdb516d3b8c44047029a423c35e9b181fdc8e..c8bcf1bc343ba6e052b1c1b9f9d6d6c472d09b1d 100644 (file)
@@ -1077,16 +1077,6 @@ fr_trunk_state_t fr_thread_ldap_trunk_state(fr_ldap_thread_t *thread, char const
        return (found) ? found->trunk->state : FR_TRUNK_STATE_MAX;
 }
 
-/** Free LDAP bind auth ctx when trunk request is "freed" with fr_trunk_request_free()
- *
- */
-static void ldap_trunk_bind_auth_free(UNUSED request_t *request, void *preq_to_free, UNUSED void *uctx)
-{
-       fr_ldap_bind_auth_ctx_t *bind = talloc_get_type_abort(preq_to_free, fr_ldap_bind_auth_ctx_t);
-
-       talloc_free(bind);
-}
-
 /** Take pending LDAP bind auths from the queue and send them.
  *
  * @param[in] el       Event list for timers.
@@ -1371,7 +1361,6 @@ fr_ldap_thread_trunk_t *fr_thread_ldap_bind_trunk_get(fr_ldap_thread_t *thread)
                                              .request_mux = ldap_trunk_bind_auth_mux,
                                              .request_demux = ldap_trunk_bind_auth_demux,
                                              .request_cancel_mux = ldap_bind_auth_cancel_mux,
-                                             .request_free = ldap_trunk_bind_auth_free
                                        },
                                       thread->bind_trunk_conf,
                                       "rlm_ldap bind auth", ttrunk, false);