Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2004-12

XmlCfg Patch

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ales Katona

This patch fixes a problem with XmlCfg related to reading a bad xml file and catching an exception:

  try
     axml:=TXMlConfig.Create(filename); // try to parse the file
   except
     on E: Exception do
       begin
         writeln('Error: '+ E.Message);
         freeandnil(axml);
       end;
   end;

There's a memory leak if the exception get's called(with or without freeandnil).

Ales

Reply by email