From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 254DE6DE092F for ; Sun, 21 May 2017 05:48:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W2mgf8h1oUXd for ; Sun, 21 May 2017 05:48:41 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 4127B6DE0A77 for ; Sun, 21 May 2017 05:48:41 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1dCQGv-0003zM-TU; Sun, 21 May 2017 08:47:45 -0400 Received: (nullmailer pid 26691 invoked by uid 1000); Sun, 21 May 2017 12:48:39 -0000 From: David Bremner To: notmuch@notmuchmail.org, notmuch@freelists.org Subject: [PATCH 5/5] cli/reply: fix memory leak Date: Sun, 21 May 2017 09:48:21 -0300 Message-Id: <20170521124821.23924-6-david@tethera.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170521124821.23924-1-david@tethera.net> References: <20170521124821.23924-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2017 12:48:42 -0000 internet_address_list_to_string returns an allocated string, which needs to be freed with g_free. --- notmuch-reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 9239aac2..6cab75bf 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -45,7 +45,7 @@ format_part_reply (GMimeStream *stream, mime_node_t *node) } else if (GMIME_IS_MESSAGE (node->part)) { GMimeMessage *message = GMIME_MESSAGE (node->part); InternetAddressList *recipients; - const char *recipients_string; + char *recipients_string; g_mime_stream_printf (stream, "> From: %s\n", g_mime_message_get_sender (message)); recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO); -- 2.11.0