Skip to content

Commit

Permalink
#15 Fix memoryleak in SSLexLexeme
Browse files Browse the repository at this point in the history
GetMem allocate one byte more than is freed with Freemem
  • Loading branch information
bero committed Aug 29, 2023
1 parent 9a28e49 commit a58031c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/ObjectSpace/Ocl/BoldSSLexU.pas
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ destructor SSLexLexeme.Destroy;
if Use <> 0 then
Assert(False, 'Assertion failure');
if Buffer <> nil then
FreeMem(Buffer, Length);
FreeMem(Buffer, Length + 1);
inherited;
end;

Expand Down

0 comments on commit a58031c

Please sign in to comment.