[pan2] Fix error found by valgrind: 216 (192 direct, 24 indirect) bytes in 1 blocks are definitely lost in
- From: Petr Kovář <pmkovar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] Fix error found by valgrind: 216 (192 direct, 24 indirect) bytes in 1 blocks are definitely lost in
- Date: Mon, 18 Jul 2016 16:24:08 +0000 (UTC)
commit 1bdde462b87861aed58cf7450f3c1ab8d49e2e78
Author: Olaf Seibert <rhialto falu nl>
Date: Tue Mar 22 00:09:34 2016 +0100
Fix error found by valgrind: 216 (192 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss
record 10,554 of 11,336
at 0x6AC0493: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x6AA238A: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x6AA3C70: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x6AA45A3: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x5165188: gtk_label_new (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.28)
by 0x47548B: init_colors (pan.cc:831)
by 0x47548B: main (pan.cc:954)
Since the widget is not top-level, nor in a container, gtk_widget_destroy () will not deref it.
pan/gui/pan.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/pan/gui/pan.cc b/pan/gui/pan.cc
index 91d1030..b7c4490 100644
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@ -866,7 +866,9 @@ namespace
fg_col = GroupPrefs::color_to_string(def_fg);
bg_col = GroupPrefs::color_to_string(def_bg);
+ g_object_ref_sink (r);
gtk_widget_destroy (r);
+ g_object_unref (r);
PanColors& c (PanColors::get());
c.def_fg = fg_col;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]