]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - src/libhydra/plugins/resolve/resolve_handler.c
Use thread save settings alloc_str function where appropriate
[thirdparty/strongswan.git] / src / libhydra / plugins / resolve / resolve_handler.c
index feb2fd05abd5ff947e4cdd786fcadf3627f21c9c..d16fec962648c4627b1c1ff22c26636cc1e3bdf3 100644 (file)
@@ -228,6 +228,7 @@ 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);
 }
 
@@ -244,7 +245,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->get_str(lib->settings,
+       this->file = lib->settings->alloc_str(lib->settings,
                                                                "%s.plugins.resolve.file", RESOLV_CONF, hydra->daemon);
 
        return &this->public;