delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <3BE6642E.9AA62568@syntrex.com> |
Date: | Mon, 05 Nov 2001 11:04:31 +0100 |
From: | Pavel Tsekov <ptsekov AT syntrex DOT com> |
X-Mailer: | Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | Robert Collins <robert DOT collins AT itdomain DOT com DOT au> |
CC: | cygwin AT cygwin DOT com |
Subject: | Re: [PATCH] setup.exe: removes some memory leaks from fromcwd.cc |
References: | <3BE2CC48 DOT 47462EC6 AT syntrex DOT com> <1004743324 DOT 9086 DOT 39 DOT camel AT lifelesswks> |
--------------9C12AFE71040ED5360F0D965 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Robert Collins wrote: > [ snip ] > I haven't committed this leak - no changelog. Good, cause I've messed it - I'm an idiot :(. Attached is the right one. And here is the Changelog entry. 2001-11-05 Pavel Tsekov <ptsekov AT syntrex DOT com> * fromcwd.cc (found_file): free() memory containing the version and filepath information for a given package, before replacing the pointers which reference this memory. --------------9C12AFE71040ED5360F0D965 Content-Type: text/plain; charset=us-ascii; name="fromcwd.cc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fromcwd.cc.diff" --- /tmp/fromcwd.cc Fri Nov 2 17:26:21 2001 +++ /tmp/Src/cygwin-snapshot-20011018-1/winsup/cinstall/fromcwd.cc Mon Nov 5 10:56:56 2001 @@ -116,8 +116,14 @@ found_file (char *path, unsigned int fsi return; } + if (p->info[trust].version) + free(p->info[trust].version); p->info[trust].version = _strdup (f.ver); + + if (p->info[trust].install) + free(p->info[trust].install); p->info[trust].install = _strdup (path); + p->info[trust].install_size = fsize; } --------------9C12AFE71040ED5360F0D965 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --------------9C12AFE71040ED5360F0D965--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |