Hi,
There is a leak in s_delete_object_glist() where the GList wasn't
free'd. I've checked (I think), every case where this function was
called, and found that the GList pointer is NULL'd immediately after.
I can't think there would be copies of that pointer still existing, and
in any case, the GList data items point to free'd memory.
This patch ought to fix the problem, and ought to be considered for the
stable release. I will note that I've not tested with valgrind after
this patch to confirm how much difference it actually makes.
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index 2fedbaf..552ad14 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -562,7 +562,7 @@ void s_delete_list_fromstart(OBJECT *start)
* \par Function Description
*
*/
-/* deletes everything include the head */
+/* deletes everything include the GList */
void
s_delete_object_glist(TOPLEVEL *toplevel, GList *list)
{
@@ -577,7 +577,7 @@ s_delete_object_glist(TOPLEVEL *toplevel, GList *list)
s_delete_object(toplevel, o_current);
ptr = ptr->prev;
}
-
+ g_list_free(list);
}
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev