From 1d5f17324c5ffeb97725f8f307a82bdb7e0dc0dd Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 5 Nov 2006 19:36:43 +0000 Subject: [PATCH] Free necessary configuration values --- src/account.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/account.c b/src/account.c index ef44844..52d9f22 100644 --- a/src/account.c +++ b/src/account.c @@ -55,11 +55,16 @@ Account * account_new(char const * type, char const * name) 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->title); - if(account->handle != NULL) - dlclose(account->handle); + dlclose(account->handle); free(account); }