From 3aca0ea421786e7dc6416390f236886e2f03c58e Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 10 Dec 2011 12:18:54 +0200 Subject: [PATCH] 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. --- notmuch-show.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.43.0