/* * Only free memory we allocated. The strings allocated via * cf_section_parse() do not need to be freed. */ static int redis_detach(void *instance) { REDIS_INST *inst = instance; fr_connection_pool_delete(inst->pool); if (inst->xlat_name) { xlat_unregister(inst->xlat_name, redis_xlat, instance); } return 0; }
/** Detach from the LDAP server and cleanup internal state. * */ static int mod_detach(void *instance) { ldap_instance_t *inst = instance; fr_connection_pool_delete(inst->pool); if (inst->user_map) { talloc_free(inst->user_map); } return 0; }
/* * Only free memory we allocated. The strings allocated via * cf_section_parse() do not need to be freed. */ static int rlm_rest_detach(void *instance) { rlm_rest_t *my_instance = instance; fr_connection_pool_delete(my_instance->conn_pool); free(my_instance); /* Free any memory used by libcurl */ rest_cleanup(); return 0; }
/* * Only free memory we allocated. The strings allocated via * cf_section_parse() do not need to be freed. */ static int mod_detach(void *instance) { rlm_rest_t *inst = instance; fr_connection_pool_delete(inst->conn_pool); xlat_unregister(inst->xlat_name, rest_xlat, instance); /* Free any memory used by libcurl */ rest_cleanup(); return 0; }
/* * Only free memory we allocated. The strings allocated via * cf_section_parse() do not need to be freed. */ static int redis_detach(void *instance) { REDIS_INST *inst = instance; fr_connection_pool_delete(inst->pool); if (inst->xlat_name) { xlat_unregister(inst->xlat_name, (RAD_XLAT_FUNC)redis_xlat); free(inst->xlat_name); } free(inst->xlat_name); free(inst); return 0; }
/** Detach the module * * Detach the module instance and free any allocated resources. * * @param instance The module instance. * @return Returns 0 (success) in all conditions. */ static int mod_detach(void *instance) { rlm_couchbase_t *inst = instance; /* instance struct */ /* free json object attribute map */ if (inst->map) { json_object_put(inst->map); } /* destroy connection pool */ if (inst->pool) { fr_connection_pool_delete(inst->pool); } /* return okay */ return 0; }
static int mod_detach(void *instance) { rlm_sql_t *inst = instance; if (inst->pool) fr_connection_pool_delete(inst->pool); /* * We need to explicitly free all children, so if the driver * parented any memory off the instance, their destructors * run before we unload the bytecode for them. * * If we don't do this, we get a SEGV deep inside the talloc code * when it tries to call a destructor that no longer exists. */ talloc_free_children(inst); /* * Decrements the reference count. The driver object won't be unloaded * until all instances of rlm_sql that use it have been destroyed. */ if (inst->handle) dlclose(inst->handle); return 0; }
/************************************************************************* * * Function: sql_poolfree * * Purpose: Clean up and free sql pool * *************************************************************************/ void sql_poolfree(SQL_INST * inst) { fr_connection_pool_delete(inst->pool); }
/************************************************************************* * * Function: sql_poolfree * * Purpose: Clean up and free sql pool * *************************************************************************/ void sql_poolfree(rlm_sql_t * inst) { fr_connection_pool_delete(inst->pool); }