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).
Showing
2 changed files
with
11 additions
and
8 deletions
... | @@ -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); | ... | ... |
-
Please register or sign in to post a comment