[PATCH 5/5] cli/reply: fix memory leak
David Bremner
david at tethera.net
Sun May 21 05:48:21 PDT 2017
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
More information about the notmuch
mailing list