[evolution/gnome-3-24] Correct possible ref/unref imbalance of a CamelFolder instance
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-24] Correct possible ref/unref imbalance of a CamelFolder instance
- Date: Wed, 3 May 2017 15:31:30 +0000 (UTC)
commit 96e3d3909951ae5f461a82242372eaa8b003e004
Author: Milan Crha <mcrha redhat com>
Date: Wed May 3 17:27:48 2017 +0200
Correct possible ref/unref imbalance of a CamelFolder instance
src/mail/e-mail-reader.c | 16 +++++-----------
src/mail/message-list.c | 2 ++
2 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/src/mail/e-mail-reader.c b/src/mail/e-mail-reader.c
index 58b50ad..ce2df97 100644
--- a/src/mail/e-mail-reader.c
+++ b/src/mail/e-mail-reader.c
@@ -364,18 +364,12 @@ mail_reader_copy_or_move_selected_messages (EMailReader *reader,
if (default_xfer_messages_uri != NULL) {
em_folder_tree_set_selected (
folder_tree, default_xfer_messages_uri, FALSE);
- } else {
- CamelFolder *folder = e_mail_reader_ref_folder (reader);
-
- if (folder) {
- gchar *uri = e_mail_folder_uri_from_folder (folder);
-
- if (uri) {
- em_folder_tree_set_selected (folder_tree, uri, FALSE);
- g_free (uri);
- }
+ } else if (folder) {
+ gchar *uri = e_mail_folder_uri_from_folder (folder);
- g_object_unref (folder);
+ if (uri) {
+ em_folder_tree_set_selected (folder_tree, uri, FALSE);
+ g_free (uri);
}
}
diff --git a/src/mail/message-list.c b/src/mail/message-list.c
index cd77d4e..f5295b9 100644
--- a/src/mail/message-list.c
+++ b/src/mail/message-list.c
@@ -5214,6 +5214,8 @@ on_click (ETree *tree,
camel_message_info_set_user_tag (info, "completed-on", NULL);
}
+ g_object_unref (folder);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]