bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] some memory leaks in wget-1.12 release source


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] some memory leaks in wget-1.12 release source
Date: Fri, 11 Mar 2011 15:27:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Zhenbo,

thanks to have reported them.  I have committed a patch (commit #2460)
which should fix these memory leaks.

Cheers,
Giuseppe



Zhenbo Xu <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]