diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-14 14:17:12 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-14 14:17:12 +0200 |
commit | d33679e4ffd9f36f14f677553b56f9b8ad72dd0d (patch) | |
tree | 292d1db7a0895a7d0b4442f5cc214852b0f8f5df /irc.c | |
parent | 21c87a78f1c01fe24610a5d05a65e52bd8eaa796 (diff) |
Call bee_free() from irc_free() or daemon mode gets pretty sad.
Diffstat (limited to 'irc.c')
-rw-r--r-- | irc.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -197,18 +197,19 @@ void irc_free( irc_t * irc ) { log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd ); - /* if( irc->status & USTATUS_IDENTIFIED && set_getbool( &irc->b->set, "save_on_quit" ) ) if( storage_save( irc, NULL, TRUE ) != STORAGE_OK ) - irc_usermsg( irc, "Error while saving settings!" ); - */ + log_message( LOGLVL_WARNING, "Error while saving settings for user %s", irc->user->nick ); irc_connection_list = g_slist_remove( irc_connection_list, irc ); - /* while( irc->queries != NULL ) query_del( irc, irc->queries ); - */ + + /* This is a little bit messy: bee_free() frees all b->users which + calls us back to free the corresponding irc->users. So do this + before we clear the remaining ones ourselves. */ + bee_free( irc->b ); while( irc->users ) irc_user_free( irc, (irc_user_t *) irc->users->data ); @@ -239,7 +240,6 @@ void irc_free( irc_t * irc ) g_free( irc->sendbuffer ); g_free( irc->readbuffer ); - g_free( irc->password ); g_free( irc ); |