From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Subject: [Patch 1/2] separate handling when addresses == NULL
Date: Fri, 09 Dec 2011 15:52:24 +0200 [thread overview]
Message-ID: <yf6ehwdx36v.fsf@taco2.nixu.fi> (raw)
In-Reply-To: <yf61usgul2n.fsf@taco2.nixu.fi>
When addresses is NULL, (future) addresses object cleanup is not needed.
---
notmuch-show.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/notmuch-show.c b/notmuch-show.c
index 603992a..c27ef6a 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -239,7 +239,11 @@ _extract_email_address (const void *ctx, const char *from)
addresses = internet_address_list_parse_string (from);
/* Bail if there is no address here. */
- if (addresses == NULL || internet_address_list_length (addresses) < 1)
+ if (addresses == NULL)
+ return email;
+
+ /* Bail if there is no address here. */
+ if (internet_address_list_length (addresses) < 1)
goto DONE;
/* Otherwise, just use the first address. */
--
1.7.7.3
next prev parent reply other threads:[~2011-12-09 13:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 20:13 [PATCH] Release memory allocated by internet_address_list_parse_string() Tomi Ollila
2011-12-07 21:29 ` Tomi Ollila
2011-12-09 13:52 ` Tomi Ollila [this message]
2011-12-09 15:57 ` [Patch 1/2] separate handling when addresses == NULL Austin Clements
2011-12-09 13:53 ` [PATCH 2/2] Release memory allocated by internet_address_list_parse_string() Tomi Ollila
2011-12-10 10:18 ` [PATCH v3] " Tomi Ollila
2011-12-11 14:49 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yf6ehwdx36v.fsf@taco2.nixu.fi \
--to=tomi.ollila@iki.fi \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).