Commit 30b5656d 30b5656dcaf1511a56b965fe0f985aa7761c3a5c by Sergey Poznyakoff

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).
1 parent 807f3d24
......@@ -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
......
......@@ -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);
......