From: Tomi Ollila Date: Sat, 10 Dec 2011 10:18:54 +0000 (+0200) Subject: Release memory allocated by internet_address_list_parse_string() X-Git-Tag: 0.11_rc1~42 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=3aca0ea421786e7dc6416390f236886e2f03c58e Release memory allocated by internet_address_list_parse_string() g_object_unref() releases the memory of the InternetAddressList object returned by internet_address_list_parse_string() -- when last (only) reference is released, internet_address_list_finalize() will do cleanup. --- diff --git a/notmuch-show.c b/notmuch-show.c index 603992a6..873a7c4c 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -255,7 +255,9 @@ _extract_email_address (const void *ctx, const char *from) email = talloc_strdup (ctx, email); DONE: - /* XXX: How to free addresses here? */ + if (addresses) + g_object_unref (addresses); + return email; }