[evolution-ews/gnome-3-22] Fix few memory leaks
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-3-22] Fix few memory leaks
- Date: Mon, 9 Jan 2017 14:08:30 +0000 (UTC)
commit 53bd7c81c6c3be4017c198f2285a6d5c07fdb51f
Author: Milan Crha <mcrha redhat com>
Date: Mon Jan 9 15:08:12 2017 +0100
Fix few memory leaks
src/camel/camel-ews-folder.c | 6 +++++-
src/server/camel-ews-settings.c | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index fcec38a..6196076 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -1862,12 +1862,16 @@ ews_refresh_info_sync (CamelFolder *folder,
do {
GSList *items_created = NULL, *items_updated = NULL;
GSList *items_deleted = NULL;
+ gchar *new_sync_state = NULL;
guint32 total, unread;
e_ews_connection_sync_folder_items_sync (cnc, EWS_PRIORITY_MEDIUM, sync_state, id, "IdOnly",
NULL, EWS_MAX_FETCH_COUNT,
- &sync_state, &includes_last_item, &items_created, &items_updated, &items_deleted,
+ &new_sync_state, &includes_last_item, &items_created, &items_updated, &items_deleted,
cancellable, &local_error);
+ g_free (sync_state);
+ sync_state = new_sync_state;
+
if (g_error_matches (local_error, EWS_CONNECTION_ERROR,
EWS_CONNECTION_ERROR_INVALIDSYNCSTATEDATA)) {
g_clear_error (&local_error);
camel_ews_summary_set_sync_state ((CamelEwsSummary *) folder->summary, NULL);
diff --git a/src/server/camel-ews-settings.c b/src/server/camel-ews-settings.c
index 2e40679..6040b5f 100644
--- a/src/server/camel-ews-settings.c
+++ b/src/server/camel-ews-settings.c
@@ -404,6 +404,7 @@ ews_settings_finalize (GObject *object)
g_free (priv->oaburl);
g_free (priv->oal_selected);
g_free (priv->impersonate_user);
+ g_free (priv->user_agent);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (camel_ews_settings_parent_class)->finalize (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]