This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: whats left before releasing setup?
- To: Robert Collins <robert dot collins at itdomain dot com dot au>
- Subject: Re: whats left before releasing setup?
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- Date: Tue, 06 Nov 2001 13:50:46 -0500
- CC: cygwin-apps at cygwin dot com
- References: <1005048150.1442.0.camel@lifelesswks>
Robert Collins wrote:
> The setup.ini should now be ok,
> the source discussion, IMO can be done separately from releasing
> setup.exe.
I've had this in my inbox for a while...it's a fix from Andy Piper's fork
of setup.exe that the XEmacs people are using.
--Chuck
2001-11-06 Charles Wilson <cwilson@ece.gatech.edu>
* geturl.cc (get_url_to_string): clean up memory leak
(get_url_to_file): ditto
Index: geturl.cc
===================================================================
RCS file: /cvs/src/src/winsup/cinstall/geturl.cc,v
retrieving revision 2.10
diff -u -r2.10 geturl.cc
--- geturl.cc 2001/11/02 00:50:19 2.10
+++ geturl.cc 2001/11/06 18:32:10
@@ -233,6 +233,8 @@
char *rv = (char *) malloc (total_bytes);
if (NULL == rv)
{
+ if (n)
+ delete n;
log (LOG_BABBLE, "get_url_to_string(): malloc failed for rv!");
return 0;
}
@@ -246,6 +248,10 @@
bufs = tmp;
}
*rvp = 0;
+
+ if (n)
+ delete n;
+
return rv;
}
Index: geturl.cc
===================================================================
RCS file: /cvs/src/src/winsup/cinstall/geturl.cc,v
retrieving revision 2.10
diff -u -r2.10 geturl.cc
--- geturl.cc 2001/11/02 00:50:19 2.10
+++ geturl.cc 2001/11/06 18:46:49
@@ -233,6 +233,8 @@
char *rv = (char *) malloc (total_bytes);
if (NULL == rv)
{
+ if (n)
+ delete n;
log (LOG_BABBLE, "get_url_to_string(): malloc failed for rv!");
return 0;
}
@@ -246,6 +248,10 @@
bufs = tmp;
}
*rvp = 0;
+
+ if (n)
+ delete n;
+
return rv;
}
@@ -300,6 +306,9 @@
total_download_bytes_sofar += total_bytes;
fclose (f);
+
+ if (n)
+ delete n;
if (total_download_bytes > 0)
{