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) ...@@ -199,7 +199,7 @@ puts_bidi (char *string)
199 } 199 }
200 #else 200 #else
201 # define alloc_logical(s) 201 # define alloc_logical(s)
202 # define puts_bidi(s) mu_stream_printf ("%s\n", s) 202 # define puts_bidi(s) mu_printf ("%s\n", s)
203 #endif 203 #endif
204 204
205 205
......
...@@ -211,15 +211,18 @@ pop_destroy (mu_mailbox_t mbox) ...@@ -211,15 +211,18 @@ pop_destroy (mu_mailbox_t mbox)
211 { 211 {
212 size_t i; 212 size_t i;
213 mu_monitor_wrlock (mbox->monitor); 213 mu_monitor_wrlock (mbox->monitor);
214 /* Destroy the pop messages and resources associated to them. */ 214 if (mpd->msg)
215 for (i = 0; i < mpd->msg_count; i++)
216 { 215 {
217 if (mpd->msg[i]) 216 /* Destroy the pop messages and resources associated to them. */
217 for (i = 0; i < mpd->msg_count; i++)
218 { 218 {
219 mu_message_destroy (&mpd->msg[i]->message, mpd->msg[i]); 219 if (mpd->msg[i])
220 if (mpd->msg[i]->uidl) 220 {
221 free (mpd->msg[i]->uidl); 221 mu_message_destroy (&mpd->msg[i]->message, mpd->msg[i]);
222 free (mpd->msg[i]); 222 if (mpd->msg[i]->uidl)
223 free (mpd->msg[i]->uidl);
224 free (mpd->msg[i]);
225 }
223 } 226 }
224 } 227 }
225 mu_pop3_destroy (&mpd->pop3); 228 mu_pop3_destroy (&mpd->pop3);
......