[Bug 1291373] Re: wget. memory leaks
Jes Bodi Klinke
1291373 at bugs.launchpad.net
Thu Jan 5 00:40:00 UTC 2017
The following patch to wget 1.13.4-2ubuntu1.4 eliminates most of the
leaks, except the one in CRYPTO_malloc which may be due to a memory
leak in the opensll library.
diff -r wget-1.13.4/src/http.c wget-1.13.4-jbk/src/http.c
2288c2288
< if (tmp)
---
> if (tmp) {
2289a2290,2291
> free(tmp);
> }
diff -r wget-1.13.4/src/retr.c wget-1.13.4-jbk/src/retr.c
291a292
> free(line);
293a295
> char *line = fd_read_line(fd);
295c297
< if (fd_read_line (fd) == NULL)
---
> if (line == NULL)
296a299,300
> else
> free(line);
355,359c359,368
< if (fd_read_line (fd) == NULL)
< {
< ret = -1;
< break;
< }
---
> {
> char *line = fd_read_line(fd);
> if (line == NULL)
> {
> ret = -1;
> break;
> }
> else
> xfree(line);
> }
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to wget in Ubuntu.
https://bugs.launchpad.net/bugs/1291373
Title:
wget. memory leaks
Status in wget package in Ubuntu:
New
Bug description:
Wget eats RAM when downloading big website. To reproduce run these on slow internet connection:
bash$ wget -r -k -p -l inf -U 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' 'http://bigwebsite.com/' 2> stderr.txt
After one ~6 hours wget eats 1.5 GiB of RAM.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: wget 1.13.4-2ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-36.52~precise1-generic 3.8.13.14
Uname: Linux 3.8.0-36-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Wed Mar 12 15:29:05 2014
InstallationMedia: Ubuntu 12.04.3 LTS "Precise Pangolin" - Release amd64 (20130820.1)
MarkForUpload: True
SourcePackage: wget
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wget/+bug/1291373/+subscriptions
More information about the foundations-bugs
mailing list