Skip to content

Potential TList leak in FindLastSameBlockByOperationsBlock in UNetProtocol.pas #244

Description

@SkybuckFlying

Potential TList leak, plus potential TPCOperationsComp leaks that were added to same TList via Do_GetOperationsBlock.

See *** for problem code.

Line 1587 start of function:

 Function FindLastSameBlockByOperationsBlock(min,max : Cardinal; var OperationBlock : TOperationBlock) : Boolean;
var i : Integer;
ant_nblock : Int64;
auxBlock, sbBlock : TOperationBlock;
distinctmax,distinctmin : Cardinal;
BlocksList : TList<TPCOperationsComp>;
errors : String;
Begin
Result := false;
OperationBlock := CT_OperationBlock_NUL;
repeat
BlocksList := TList<TPCOperationsComp>.Create; // *** LIST CREATED ***
try
If Not Do_GetOperationsBlock(Nil,min,max,20000,true,BlocksList) then exit; // *** LIST NOT DESTROYED ***

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions