else
data->html_body = NULL;
- data->attachments = priv->attachments; /* TODO: copy and free ? */
+ /* deep-copy the data */
+ GList *cursor = priv->attachments;
+ data->attachments = NULL;
+ while (cursor) {
+ data->attachments = g_list_append (data->attachments,
+ g_strdup ((gchar*)cursor->data));
+ cursor = g_list_next (cursor);
+ }
+
+
data->priority_flags = priv->priority_flags;
return data;
g_list_foreach (data->attachments, (GFunc)g_free, NULL);
g_list_free (data->attachments);
- /* TODO: Free data->attachments? */
-
g_slice_free (MsgData, data);
}