*
* There is no delete callback, so operations such as closing sockets and
* freeing library connection handles should be done by a destructor attached
- * to memory allocated beneath parent.
+ * to memory allocated beneath ctx.
*
* @note A function pointer matching this prototype must be passed
- * to fr_connection_pool.
+ * to fr_connection_pool_init.
*
* @param[in,out] ctx to allocate memory in.
* @param[in] opaque pointer passed to fr_connection_pool_init.
*/
static int _mod_conn_free(ldap_handle_t *conn)
{
- DEBUG3("rlm_ldap: Closing libldap handle %p", conn->handle);
-
- if (conn->handle) ldap_unbind_s(conn->handle);
+ if (conn->handle) {
+ DEBUG3("rlm_ldap: Closing libldap handle %p", conn->handle);
+ ldap_unbind_s(conn->handle);
+ }
return 0;
}
* fr_connection_pool_init, and called when a new connection is required by the
* connection pool API.
*
- * @see mod_conn_delete
* @see fr_connection_pool_init
* @see fr_connection_create_t
* @see connection.c