[evolution-ews] Memory leak in e_ews_dump_file_attachment_from_soap_parameter()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Memory leak in e_ews_dump_file_attachment_from_soap_parameter()
- Date: Fri, 13 Mar 2015 13:46:26 +0000 (UTC)
commit f965660ed2c68f39c3a9b8b3bfc53231a2ffc040
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 13 14:46:51 2015 +0100
Memory leak in e_ews_dump_file_attachment_from_soap_parameter()
src/server/e-ews-item.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-item.c b/src/server/e-ews-item.c
index 73ddea5..ab859ee 100644
--- a/src/server/e-ews-item.c
+++ b/src/server/e-ews-item.c
@@ -1718,6 +1718,8 @@ e_ews_dump_file_attachment_from_soap_parameter (ESoapParameter *param,
}
if (cache && content && g_file_test ((const gchar *) content, G_FILE_TEST_IS_REGULAR |
G_FILE_TEST_EXISTS)) {
+ gchar *uri;
+
info = e_ews_attachment_info_new (E_EWS_ATTACHMENT_INFO_TYPE_URI);
tmpfilename = (gchar *) content;
@@ -1740,8 +1742,10 @@ e_ews_dump_file_attachment_from_soap_parameter (ESoapParameter *param,
g_free (content);
/* Return URI to saved file */
- e_ews_attachment_info_set_uri (info, g_filename_to_uri (filename, NULL, NULL));
+ uri = g_filename_to_uri (filename, NULL, NULL);
+ e_ews_attachment_info_set_uri (info, uri);
g_free (filename);
+ g_free (uri);
} else {
info = e_ews_attachment_info_new (E_EWS_ATTACHMENT_INFO_TYPE_INLINED);
e_ews_attachment_info_set_inlined_data (info, content, data_len);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]