diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-02-18 17:19:01 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-02-18 17:19:01 +0000 |
commit | f959495182db79b0c3b51c6bc4e9fcacdc591c40 (patch) | |
tree | dde0690b557cf9d99fec00fab88c898e530c3881 /irc.c | |
parent | 7e0af5345f398a439459ac1752b8a946fb53a87e (diff) |
Preventing infinite loop while cleaning up accounts in irc_free(). Closes #245.
Diffstat (limited to 'irc.c')
-rw-r--r-- | irc.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -255,7 +255,12 @@ void irc_free(irc_t * irc) query_del(irc, irc->queries); while (irc->accounts) - account_del(irc, irc->accounts); + if (irc->accounts->gc == NULL) + account_del(irc, irc->accounts); + else + /* Nasty hack, but account_del() doesn't work in this + case and we don't want infinite loops, do we? ;-) */ + irc->accounts = irc->accounts->next; while (irc->set) set_del(&irc->set, irc->set->key); |