summaryrefslogtreecommitdiffstats
path: root/imap
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-12-06 08:27:37 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-12-06 08:27:37 +0000
commit21af2452e1337c4157e4bb24fc753a0d4027a0db (patch)
tree9914598981242108e72201419bfda7c28578f7a0 /imap
parent23b76e8fb460000aaa8e112f7019bfadc4b200f7 (diff)
Fix a memory leak in imap_logout_all.
Diffstat (limited to 'imap')
-rw-r--r--imap/imap.c7
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;
}
}