{
lib->credmgr->remove_set(lib->credmgr, &this->cred->set);
}
- this->res->destroy(this->res);
+ DESTROY_IF(this->res);
DESTROY_IF(this->cred);
free(this);
}
if (!this->res)
{
- DBG1(DBG_CFG, "ipseckey_plugin: Failed to create"
- "a DNS resolver instance");
+ DBG1(DBG_CFG, "failed to create a DNS resolver instance");
destroy(this);
return NULL;
}
METHOD(resolver_manager_t, create, resolver_t*,
private_resolver_manager_t *this)
{
- return this->constructor();
+ if (this->constructor)
+ {
+ return this->constructor();
+ }
+ return NULL;
}
METHOD(resolver_manager_t, destroy, void,