Revert alloc_str changes
This reverts commitfdead26ffe. This reverts commit3e2419ebe3. This reverts commit17ce69b47a.
This commit is contained in:
@@ -109,8 +109,8 @@ static void add_legacy_entry(private_attr_provider_t *this, char *key, int nr,
|
||||
host_t *host;
|
||||
char *str;
|
||||
|
||||
str = lib->settings->alloc_str(lib->settings, "%s.%s%d", NULL,
|
||||
hydra->daemon, key, nr);
|
||||
str = lib->settings->get_str(lib->settings, "%s.%s%d", NULL, hydra->daemon,
|
||||
key, nr);
|
||||
if (str)
|
||||
{
|
||||
host = host_create_from_string(str, 0);
|
||||
@@ -139,7 +139,6 @@ static void add_legacy_entry(private_attr_provider_t *this, char *key, int nr,
|
||||
configuration_attribute_type_names, entry->type, &entry->value);
|
||||
this->attributes->insert_last(this->attributes, entry);
|
||||
}
|
||||
free(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +228,6 @@ static enumerator_t* create_attribute_enumerator(private_resolve_handler_t *this
|
||||
static void destroy(private_resolve_handler_t *this)
|
||||
{
|
||||
this->mutex->destroy(this->mutex);
|
||||
free(this->file);
|
||||
free(this);
|
||||
}
|
||||
|
||||
@@ -245,7 +244,7 @@ resolve_handler_t *resolve_handler_create()
|
||||
this->public.destroy = (void(*)(resolve_handler_t*))destroy;
|
||||
|
||||
this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
|
||||
this->file = lib->settings->alloc_str(lib->settings,
|
||||
this->file = lib->settings->get_str(lib->settings,
|
||||
"%s.plugins.resolve.file", RESOLV_CONF, hydra->daemon);
|
||||
|
||||
return &this->public;
|
||||
|
||||
Reference in New Issue
Block a user