[balsa/wip/gtk4: 269/351] mailbox local: Do not dereference NULL pointer
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gtk4: 269/351] mailbox local: Do not dereference NULL pointer
- Date: Wed, 23 May 2018 21:39:35 +0000 (UTC)
commit a95f8c806963e3f146357c52998433f05053a46c
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Mon Apr 2 20:35:24 2018 -0400
mailbox local: Do not dereference NULL pointer
Boneheaded optimization!
libbalsa/mailbox_local.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libbalsa/mailbox_local.c b/libbalsa/mailbox_local.c
index 7f09344..eae2c89 100644
--- a/libbalsa/mailbox_local.c
+++ b/libbalsa/mailbox_local.c
@@ -929,11 +929,8 @@ message_match_real(LibBalsaMailbox *mailbox,
if (entry->idle_pending) {
return FALSE; /* Can't match. */
-
}
- headers = libbalsa_message_get_headers(message);
-
switch (cond->type) {
case CONDITION_STRING:
if (CONDITION_CHKMATCH(cond, (CONDITION_MATCH_TO |
@@ -958,6 +955,7 @@ message_match_real(LibBalsaMailbox *mailbox,
/* do the work */
if (CONDITION_CHKMATCH(cond, CONDITION_MATCH_TO)) {
g_assert(is_refed);
+ headers = libbalsa_message_get_headers(message);
if (headers->to_list != NULL) {
gchar *str =
internet_address_list_to_string(headers->to_list, FALSE);
@@ -985,6 +983,7 @@ message_match_real(LibBalsaMailbox *mailbox,
}
if (CONDITION_CHKMATCH(cond, CONDITION_MATCH_CC)) {
g_assert(is_refed);
+ headers = libbalsa_message_get_headers(message);
if (headers->cc_list != NULL) {
gchar *str =
internet_address_list_to_string(headers->cc_list, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]