[evolution-data-server] Fix a CamelVeeMessageInfo memory leak
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix a CamelVeeMessageInfo memory leak
- Date: Fri, 27 Jan 2017 08:25:16 +0000 (UTC)
commit aea8111426281b6453c8590247e5481c9447ca9f
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 27 09:24:00 2017 +0100
Fix a CamelVeeMessageInfo memory leak
It had been never freed, because of the g_clear_object() use twice
in a row, where the first had been supposed to be g_object_unref()
instead. Even the 'git blame' shows a different commit author, it
had been my change and thus also my fault.
src/camel/camel-debug.c | 2 +-
src/camel/camel-vee-summary.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/camel-debug.c b/src/camel/camel-debug.c
index 911c7e0..132c73d 100644
--- a/src/camel/camel-debug.c
+++ b/src/camel/camel-debug.c
@@ -996,7 +996,7 @@ remove_matching_ref_backtrace (GQueue *backtraces,
BacktraceLine *btline = bt->lines->next->data;
if (g_strcmp0 ("g_weak_ref_get()", btline->function) == 0)
- inc_up_lines = 1;
+ inc_up_lines = 2;
}
if (backtrace_matches_ref (bt, unref_backtrace, up_lines + inc_up_lines)) {
diff --git a/src/camel/camel-vee-summary.c b/src/camel/camel-vee-summary.c
index c75f01a..2b51c26 100644
--- a/src/camel/camel-vee-summary.c
+++ b/src/camel/camel-vee-summary.c
@@ -293,9 +293,9 @@ camel_vee_summary_remove (CamelVeeSummary *summary,
camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (summary), vuid);
if (mi) {
- /* under twice, the first for camel_folder_summary_peek_loaded(),
+ /* unref twice, the first for camel_folder_summary_peek_loaded(),
* the second to actually free the mi */
- g_clear_object (&mi);
+ g_object_unref (mi);
g_clear_object (&mi);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]