[gmime] Use idn2_free() to free strings allocated by oother idn2 calls
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Use idn2_free() to free strings allocated by oother idn2 calls
- Date: Mon, 21 May 2018 23:53:00 +0000 (UTC)
commit ec2d8b51c30b3c5243a258d6a66da9357565ae39
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Mon May 21 12:16:41 2018 -0400
Use idn2_free() to free strings allocated by oother idn2 calls
gmime/gmime-utils.c | 2 +-
gmime/internet-address.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index d91909e..e0e902a 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -859,7 +859,7 @@ g_mime_utils_generate_message_id (const char *fqdn)
#ifdef LIBIDN
if (idn2_to_ascii_8z (fqdn, &ascii, 0) == IDN2_OK) {
g_string_append (msgid, ascii);
- free (ascii);
+ idn2_free (ascii);
} else {
g_string_append (msgid, fqdn);
}
diff --git a/gmime/internet-address.c b/gmime/internet-address.c
index 31b1e56..afb17bb 100644
--- a/gmime/internet-address.c
+++ b/gmime/internet-address.c
@@ -467,7 +467,7 @@ internet_address_mailbox_get_idn_addr (InternetAddressMailbox *mailbox)
g_string_append_len (encoded, mailbox->addr, mailbox->at + 1);
if (idn2_to_ascii_8z (mailbox->addr + mailbox->at + 1, &ascii, 0) == IDN2_OK) {
g_string_append (encoded, ascii);
- free (ascii);
+ idn2_free (ascii);
} else {
g_string_append (encoded, mailbox->addr + mailbox->at + 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]