When playing with fixing the bug:

segfault on "Include component as individual objects"

I spotted a discrepancy between how the complex_place_list is being
free'd.

Turns out the bug being investigated was due to the complex_place_list
not being reset to NULL after its objects, and the glist were free'd.


I discovered that for normal object placement, only the glist is free'd,
not the objects themselves, which seemed like it might be a leak.

The attached patch seems to produce lots less leaked memory in a
valgrind run when placing components, but I want someone to check it
seems sensible before I commit it.

Are there any cases where the objects in the complex_place_list don't
"belong" to the list - such that we CANNOT free them?

Any takers for a quick review?

-- 
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!)

Attachment: 0001-Fixed-memory-leak-placing-components.patch
Description: application/mbox


_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to