[lazarus] New Bug Entered

bugtracker at miraclec.com bugtracker at miraclec.com
Mon Oct 28 15:39:36 EST 2002



Title: Unitialised variables and memory leak

Entered by: Jeroen van Iddekinge

1) In TGtkObject.InitStockItems the function CreateBrushIndirect is called.  logbrush.lbStyle is set to bs_null , but logbrush.lbColor is not set and is therefor unitialised. lbColor should be set because it is used in CreateBrushIndirect in a call to GetGDIolorRef

2) TGtkObject.FillScreenFont, memory leak
XFreeFontNames(theFonts) should be added. 

3) TGtkObject.SelectClipRgn.
The first lines of this routine is:

if not isValidDc(DC) then
  Result := Error;
if Result <> Error then

This should be something like:

Error := 0
if not IsValidDc(DC) then
    Result := Error;
if Result <> Error then






More information about the Lazarus mailing list