delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/03/14/07:17:32

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: <alpine.DEB.2.00.1603130700180.7885@igor2priv>
Message-ID: <alpine.DEB.2.00.1603141153550.7885@igor2priv>
References: <alpine DOT DEB DOT 2 DOT 00 DOT 1603130700180 DOT 7885 AT igor2priv>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
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

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019