Hi Zhenbo, thanks to have reported them. I have committed a patch (commit #2460) which should fix these memory leaks.
Cheers, Giuseppe Zhenbo Xu <[email protected]> writes: > 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
