Free necessary configuration values
This commit is contained in:
parent
b9c009bab1
commit
1d5f17324c
@ -55,10 +55,15 @@ Account * account_new(char const * type, char const * name)
|
|||||||
|
|
||||||
void account_delete(Account * account)
|
void account_delete(Account * account)
|
||||||
{
|
{
|
||||||
/* FIXME free config values */
|
AccountConfig * p;
|
||||||
|
|
||||||
|
if(account->plugin->config != NULL)
|
||||||
|
for(p = account->plugin->config; p->name != NULL; p++)
|
||||||
|
if(p->type == ACT_STRING || p->type == ACT_PASSWORD
|
||||||
|
|| p->type == ACT_FILE)
|
||||||
|
free(p->value);
|
||||||
free(account->name);
|
free(account->name);
|
||||||
free(account->title);
|
free(account->title);
|
||||||
if(account->handle != NULL)
|
|
||||||
dlclose(account->handle);
|
dlclose(account->handle);
|
||||||
free(account);
|
free(account);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user