delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/03/14/23:36:46

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: <alpine.DEB.2.00.1603140610270.7885@igor2priv>
Message-ID: <alpine.DEB.2.00.1603150436220.7885@igor2priv>
References: <alpine DOT DEB DOT 2 DOT 00 DOT 1603130700180 DOT 7885 AT igor2priv> <alpine DOT DEB DOT 2 DOT 00 DOT 1603140610270 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


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)


- Raw text -


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