Free necessary configuration values

This commit is contained in:
Pierre Pronchery 2006-11-05 19:36:43 +00:00
parent b9c009bab1
commit 1d5f17324c

View File

@ -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);
} }