diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-12-23 16:02:39 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-12-23 16:02:39 +0200 |
commit | 30b5656dcaf1511a56b965fe0f985aa7761c3a5c (patch) | |
tree | 5a4c31272026a2269b282d4454c32b7a942f57d2 | |
parent | 807f3d246e0dbe13da92328dc5dc47ca9f6d504a (diff) | |
download | mailutils-30b5656dcaf1511a56b965fe0f985aa7761c3a5c.tar.gz mailutils-30b5656dcaf1511a56b965fe0f985aa7761c3a5c.tar.bz2 |
Bugfixes.
* frm/common.c [!HAVE_LIBFRIBIDI] (puts_bidi): Fix definition.
* libproto/pop/mbox.c (pop_destroy): Fix coredump (occurred
if the mailbox has not been scanned).
-rw-r--r-- | frm/common.c | 2 | ||||
-rw-r--r-- | libproto/pop/mbox.c | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/frm/common.c b/frm/common.c index dfecd2d65..592838587 100644 --- a/frm/common.c +++ b/frm/common.c @@ -199,7 +199,7 @@ puts_bidi (char *string) } #else # define alloc_logical(s) -# define puts_bidi(s) mu_stream_printf ("%s\n", s) +# define puts_bidi(s) mu_printf ("%s\n", s) #endif diff --git a/libproto/pop/mbox.c b/libproto/pop/mbox.c index 7c4eeb90e..6160d0d29 100644 --- a/libproto/pop/mbox.c +++ b/libproto/pop/mbox.c @@ -211,15 +211,18 @@ pop_destroy (mu_mailbox_t mbox) { size_t i; mu_monitor_wrlock (mbox->monitor); - /* Destroy the pop messages and resources associated to them. */ - for (i = 0; i < mpd->msg_count; i++) + if (mpd->msg) { - if (mpd->msg[i]) + /* Destroy the pop messages and resources associated to them. */ + for (i = 0; i < mpd->msg_count; i++) { - mu_message_destroy (&mpd->msg[i]->message, mpd->msg[i]); - if (mpd->msg[i]->uidl) - free (mpd->msg[i]->uidl); - free (mpd->msg[i]); + if (mpd->msg[i]) + { + mu_message_destroy (&mpd->msg[i]->message, mpd->msg[i]); + if (mpd->msg[i]->uidl) + free (mpd->msg[i]->uidl); + free (mpd->msg[i]); + } } } mu_pop3_destroy (&mpd->pop3); |