diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-12-06 08:27:37 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-12-06 08:27:37 +0000 |
commit | 21af2452e1337c4157e4bb24fc753a0d4027a0db (patch) | |
tree | 9914598981242108e72201419bfda7c28578f7a0 /imap | |
parent | 23b76e8fb460000aaa8e112f7019bfadc4b200f7 (diff) |
Fix a memory leak in imap_logout_all.
Diffstat (limited to 'imap')
-rw-r--r-- | imap/imap.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/imap/imap.c b/imap/imap.c index 0ccf4b10..4f7913eb 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -82,7 +82,7 @@ void imap_logout_all (void) while (conn) { - tmp = conn; + tmp = conn->next; if (conn->account.type == M_ACCT_TYPE_IMAP && conn->fd >= 0) { @@ -90,11 +90,10 @@ void imap_logout_all (void) imap_logout ((IMAP_DATA*) conn->data); mutt_clear_error (); mutt_socket_close (conn); - - mutt_socket_free (tmp); + mutt_socket_free (conn); } - conn = conn->next; + conn = tmp; } } |