[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] some memory leaks in wget-1.12 release source
From: |
Zhenbo Xu |
Subject: |
[Bug-wget] some memory leaks in wget-1.12 release source |
Date: |
Fri, 11 Mar 2011 16:47:13 +0800 |
Hi,everybody!
I found some memory leaks in wget-1.12 source codes.The following lists
the bugs:
bug 1:
File:ftp-ls.c
Location: line 456
Description:
In function ftp_parse_winnt_ls,
...
while ((line =read_whole_line(fp)) != NULL) {
len = clean_line(line)
if (len < 40)continue; //Leak occured here, "line" is not released.
...
...
}
bug 2:
File : ftp.c
Location: line 304
Description:
in function getftp(),
getftp(...) {
...
...
if (con->proxy) {
logname = concat_strings(...); //line 295, allocated a heap
region to logname
}
...
csock = connect_to_host (host, port);
if (csock == E_HOST)
return HOSTERR; //return without free(logname)
...
...
}
I'm glad to get your replies if these are the real bugs .
Best Wishes!
--
from Zhenbo Xu
- [Bug-wget] some memory leaks in wget-1.12 release source,
Zhenbo Xu <=