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.