X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Tue, 15 Mar 2016 04:40:18 +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; charset=US-ASCII; format=flowed 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 On Mon, 14 Mar 2016, gedau AT igor2 DOT repo DOT hu wrote: > Yet another round of leak hunting; same remarks as before. > > 1. Easy > > - file.c/PrintQuotedString() keeps a cache of a dynamic string that is never > free()'d. My solution was to make the string a static global and add a > file_uninit() that can free it at the end (r1256). Turns out all string quoting ends up on a FILE *. Rewriting PrintQuotedString() to work directly onto a FILE * removes the need to manipulate dynamic strings for quoting and removes any potential leak related to that. (r1296)