Commit 27453a47 authored by Milan Crha's avatar Milan Crha

Fix various memory leaks

parent 91bc2605
......@@ -535,6 +535,7 @@ ews_connection_schedule_queue_message (EEwsConnection *cnc,
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, ews_connection_scheduled_cb, sd, NULL);
g_source_attach (source, cnc->priv->soup_context);
g_source_unref (source);
}
static void
......@@ -556,6 +557,7 @@ ews_connection_schedule_cancel_message (EEwsConnection *cnc,
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, ews_connection_scheduled_cb, sd, NULL);
g_source_attach (source, cnc->priv->soup_context);
g_source_unref (source);
}
static void
......@@ -574,6 +576,7 @@ ews_connection_schedule_abort (EEwsConnection *cnc)
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, ews_connection_scheduled_cb, sd, NULL);
g_source_attach (source, cnc->priv->soup_context);
g_source_unref (source);
}
static void ews_cancel_request (GCancellable *cancellable, gpointer user_data);
......@@ -655,6 +658,7 @@ ews_trigger_next_request (EEwsConnection *cnc)
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_callback (source, ews_next_request, cnc, NULL);
g_source_attach (source, cnc->priv->soup_context);
g_source_unref (source);
} else {
ews_next_request (cnc);
}
......@@ -6978,6 +6982,7 @@ ews_handle_attachments_param (ESoapParameter *param,
if (!g_ascii_strcasecmp (name, "ItemAttachment")) {
item = e_ews_item_new_from_soap_parameter (subparam);
info = e_ews_item_dump_mime_content (item, async_data->directory);
g_clear_object (&item);
} else if (!g_ascii_strcasecmp (name, "FileAttachment")) {
info = e_ews_dump_file_attachment_from_soap_parameter (
......
......@@ -492,6 +492,7 @@ parse_extended_property (EEwsItemPrivate *priv,
if (!set_hash) {
set_hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free);
g_hash_table_insert (priv->mapi_extended_sets, setid, set_hash);
setid = NULL;
}
g_hash_table_insert (set_hash, GUINT_TO_POINTER (tag), g_strdup (value));
......@@ -500,6 +501,7 @@ parse_extended_property (EEwsItemPrivate *priv,
g_hash_table_insert (priv->mapi_extended_tags, GUINT_TO_POINTER (tag), g_strdup (value));
}
g_free (setid);
g_free (value);
g_free (name);
}
......
......@@ -1091,7 +1091,9 @@ e_soap_message_persist (ESoapMessage *msg)
soup_message_set_request (
SOUP_MESSAGE (msg),
"text/xml; charset=utf-8",
SOUP_MEMORY_TAKE, (gchar *) body, len);
SOUP_MEMORY_COPY, (gchar *) body, len);
xmlFree (body);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment