X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Mon, 14 Mar 2016 12:21:17 +0100 (CET) X-X-Sender: igor2 AT igor2priv To: geda-user AT delorie DOT com X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu Subject: Re: [geda-user] pcb: more memory leaks In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Another batch: 1. Easy - PCB->RouteStyle[*].Name never free()'d. It is created during parse and should be free()'d in mymem.c:FreePCBMemory() (r1281) - hid/batch/batch.c: the prompt is never free()'d. Normally it'd be impossible to do without a proper uninit hook in HIDs (which pcb doesn't have), but in this case it's easy to work it around: the main loop is in batch_do_export() and it returns if fgets() fails to read the next line. It's possible to insert an uninit call there and free the prompt (r1282) - hid/common/flags.c: list hid_flag_nodes is never freed - hid/common/hidinit.c: list hid_attr_nodes is never freed (The last two are similar to the eariler report about all_actions. I fixed all three in a way that allows pcb-rnd plugins to clean up their own registration so that plugins will be able to unload/reload runtime without leaking memory or leaving dangling references. For mainline these should be just freed at the end, or should be alloced with leaky_calloc(), if anything should be done at all, as these are non-growing leaks).