[delphizip] Re: Memory leak in Inflate.c in Unzip.dll

  • From: "R. Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Thu, 8 May 2003 16:00:28 +1000

I checked that it was eventually freed but not how often it was allocated.
Would like a copy of your corrected Pascal version - I was planning to port
it to Pascal myself.
Most of UnzDll already exists in the vcl so want to eliminate UnzDll.
- Russell Peters
----- Original Message ----- 
From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Thursday, May 08, 2003 6:22 AM
Subject: [delphizip] Re: Memory leak in Inflate.c in Unzip.dll


>
> I spotted this fault (in the Delphi sfx code) a while back and reported it
> to Markus. I can supply a fully corrected version of this code (in Pascal)
> or you can look in the latest Pascal version - I believe Markus
implemented
> the changes I suggested. There is not only a memory leak but an
inefficiency
> since the same data is repeatedly placed in the allocated memory.
>
> In practice, the leak is very minor since this part of the inflate code is
> rarely called.
>
> James Turner
> SKARO.NET
>
>
>
> ----- Original Message -----
> From: "Roger Aelbrecht" <Roger.Aelbrecht@xxxxxxxxxx>
> To: <delphizip@xxxxxxxxxxxxx>
> Sent: Wednesday, May 07, 2003 7:34 PM
> Subject: [delphizip] Memory leak in Inflate.c in Unzip.dll
>
>
> >
> > I used the code of Inflate.c in TZipBuilderSFX component.
> >
> > During test of this component CodeGuard reported
> > a memory leak of memory blocs created with malloc
> > in the function 'huft_build(..)' called from inflate_fixed.
> >
> > After adding :
> >
> > huft_free(fixed_tl);
> > huft_free(fixed_td);
> >
> > at the end of the function inflate_fixed
> > just after
> >
> > inflate_codes(fixed_tl, fixed_td, fixed_bl, fixed_bd);
> >
> > CodeGuard did not report any errors
> >
> > HTH
> >
> >
> > Roger Aelbrecht
> > http://web.wanadoo.be/driehoeksw
> > -----------
> > To unsubscribe from this list, send an empty e-mail
> > message to:
> >   delphizip-request@xxxxxxxxxxxxx
> > and put the word unsubscribe in the subject.
>
> -----------
> To unsubscribe from this list, send an empty e-mail
> message to:
>   delphizip-request@xxxxxxxxxxxxx
> and put the word unsubscribe in the subject.
>


-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: