Skip to content

Commit a58031c

Browse files
committed
#15 Fix memoryleak in SSLexLexeme
GetMem allocate one byte more than is freed with Freemem
1 parent 9a28e49 commit a58031c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/ObjectSpace/Ocl/BoldSSLexU.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ destructor SSLexLexeme.Destroy;
401401
if Use <> 0 then
402402
Assert(False, 'Assertion failure');
403403
if Buffer <> nil then
404-
FreeMem(Buffer, Length);
404+
FreeMem(Buffer, Length + 1);
405405
inherited;
406406
end;
407407

0 commit comments

Comments
 (0)