[anjal: 4/6] Fix leak in emts_sort_view()
- From: Jonathon Jongsma <jjongsma src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [anjal: 4/6] Fix leak in emts_sort_view()
- Date: Mon, 2 Nov 2009 18:06:14 +0000 (UTC)
commit 49ea999b0944dfb5e4bbec507089e561f3be3167
Author: Jonathon Jongsma <jonathon jongsma collabora co uk>
Date: Wed Oct 7 22:03:29 2009 -0500
Fix leak in emts_sort_view()
nodes ptr array was not freed properly:
==25554== 6,736 (128 direct, 6,608 indirect) bytes in 4 blocks are definitely lost in loss record 13,126 of 13,261
==25554== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==25554== by 0xE747552: g_malloc (gmem.c:131)
==25554== by 0xE75D3C7: g_slice_alloc (gslice.c:824)
==25554== by 0xE71A279: g_ptr_array_sized_new (garray.c:449)
==25554== by 0x42A9D5: emts_sort_view (em-tree-store.c:964)
==25554== by 0x42B393: em_tree_store_add_folder (em-tree-store.c:1188)
https://bugzilla.gnome.org/show_bug.cgi?id=599793
src/em-tree-store.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/em-tree-store.c b/src/em-tree-store.c
index 4c95185..55f8299 100644
--- a/src/em-tree-store.c
+++ b/src/em-tree-store.c
@@ -17,6 +17,7 @@
* Srinivasa Ragavan <sragavan novell com>
*
* Copyright (C) 2009 Novell, Inc. (www.novell.com)
+ * Copyright (C) 2009 Intel Corporation (www.intel.com)
*
*/
@@ -976,6 +977,7 @@ emts_sort_view (EMTreeStore *emts, struct _emts_folder *f)
for (i=0; i < nodes->len; i++) {
e_dlist_addtail(&emts->root->children, (EDListNode *)nodes->pdata[i]);
}
+ g_ptr_array_free (nodes, TRUE);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]