diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-02 15:28:23 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-02 15:28:23 +0200 |
commit | dd345753c1742905c9f81aa71d8b09109fbc5456 (patch) | |
tree | 8689e25f6465c17c3dd5913af6ae289bf13768d4 /account.c | |
parent | 0db75ad966458610427dacdd31ecbaddbca18935 (diff) | |
parent | fa75134008bd9206ca02380927c27581feb65c3e (diff) |
merge trunk.
Diffstat (limited to 'account.c')
-rw-r--r-- | account.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -181,19 +181,17 @@ void account_del( irc_t *irc, account_t *acc ) { account_t *a, *l = NULL; + if( acc->ic ) + /* Caller should have checked, accounts still in use can't be deleted. */ + return; + for( a = irc->accounts; a; a = (l=a)->next ) if( a == acc ) { - if( a->ic ) return; /* Caller should have checked, accounts still in use can't be deleted. */ - if( l ) - { l->next = a->next; - } else - { irc->accounts = a->next; - } while( a->set ) set_del( &a->set, a->set->key ); @@ -202,7 +200,7 @@ void account_del( irc_t *irc, account_t *acc ) g_free( a->user ); g_free( a->pass ); - if( a->server ) g_free( a->server ); + g_free( a->server ); if( a->reconnect ) /* This prevents any reconnect still queued to happen */ cancel_auto_reconnect( a ); g_free( a ); |