diff options
author | Brendan Cully <brendan@kublai.com> | 2007-02-12 00:06:32 +0000 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2007-02-12 00:06:32 +0000 |
commit | bf89c5b891eb8e5f3cd6bfe3e7ce84243db7429b (patch) | |
tree | 12bd2ed568bd5f81d72e10d6ad1d72b3954f80f0 /imap/message.c | |
parent | 43fb236d0e202e6dd1363f26d5e85c510112cf1a (diff) |
Do not attempt to free NULL IMAP headers after a partial mailbox load.
Diffstat (limited to 'imap/message.c')
-rw-r--r-- | imap/message.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/imap/message.c b/imap/message.c index 586d362d..4fa6a0f6 100644 --- a/imap/message.c +++ b/imap/message.c @@ -193,7 +193,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) else /* bad header in the cache, we'll have to refetch. * TODO: consider the possibility of a holey cache. */ - imap_free_header_data((void**) &h.data); + imap_free_header_data((void**) &h.data); FREE(&uid_validity); } @@ -202,7 +202,8 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) break; if ((mfhrc < -1) || ((rc != IMAP_CMD_CONTINUE) && (rc != IMAP_CMD_OK))) { - imap_free_header_data ((void**) &h.data); + if (h.data) + imap_free_header_data ((void**) &h.data); fclose (fp); mutt_hcache_close (hc); return -1; @@ -303,7 +304,8 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend) if ((mfhrc < -1) || ((rc != IMAP_CMD_CONTINUE) && (rc != IMAP_CMD_OK))) { - imap_free_header_data ((void**) &h.data); + if (h.data) + imap_free_header_data ((void**) &h.data); fclose (fp); #if USE_HCACHE mutt_hcache_close (hc); |