[pan2] Fix error found by valgrind: 7, 343 (120 direct, 7, 223 indirect) bytes in 1 blocks are definitely los
- From: Petr Kovář <pmkovar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] Fix error found by valgrind: 7, 343 (120 direct, 7, 223 indirect) bytes in 1 blocks are definitely los
- Date: Fri, 18 Mar 2016 20:58:38 +0000 (UTC)
commit 3c07a426eb32a63bb9639b9c1eb3bf4ba29ec0cb
Author: Olaf Seibert <rhialto falu nl>
Date: Mon Mar 14 22:34:14 2016 +0100
Fix error found by valgrind: 7,343 (120 direct, 7,223 indirect) bytes in 1 blocks are definitely lost in
loss record 11,630 of 11,682
at 0x4C2BBCF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x6D2F578: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.2)
by 0x6D46762: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.2)
by 0x6D46DFD: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.2)
by 0x6AC0371: 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 0x7903ABC: g_mime_message_new (in /usr/lib/x86_64-linux-gnu/libgmime-2.6.so.0.620.0)
by 0x790E584: g_mime_parser_construct_message (in /usr/lib/x86_64-linux-gnu/libgmime-2.6.so.0.620.0)
by 0x5492D3: pan::mime::construct_message(_GMimeStream**, int, pan::GPGDecErr&) (mime-utils.cc:1142)
by 0x53939E: pan::ArticleCache::get_message(std::vector<pan::Quark, std::allocator<pan::Quark> >
const&, pan::GPGDecErr&) const (article-cache.cc:433)
by 0x463AD9: pan::GUI::root_realized_cb(_GtkWidget*, void*) (gui.cc:206)
pan/gui/gui.cc | 2 +-
pan/usenet-utils/mime-utils.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index 86cba3d..2e4069c 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -208,7 +208,7 @@ GUI :: root_realized_cb (GtkWidget*, gpointer self_gpointer)
msg = gui->_cache.get_message(files);
#endif
gui->_body_pane->set_text_from_message(msg);
-
+ g_object_unref(msg);
}
}
diff --git a/pan/usenet-utils/mime-utils.cc b/pan/usenet-utils/mime-utils.cc
index 616a93f..923ac55 100644
--- a/pan/usenet-utils/mime-utils.cc
+++ b/pan/usenet-utils/mime-utils.cc
@@ -1209,7 +1209,7 @@ mime :: construct_message (GMimeStream ** istreams,
{
GMimeMultipart * mp = g_mime_multipart_new ();
- for (int i=0; i<qty; ++i)
+ for (int i=0; i<qty; ++i) // should this 0 be 1?
{
g_mime_multipart_add(mp,g_mime_message_get_mime_part(messages[i]) );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]