mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:49:22 +02:00
FpDebug: Fix mem-leak
git-svn-id: trunk@65167 -
This commit is contained in:
parent
43ae6df320
commit
a1b4044047
@ -2865,10 +2865,13 @@ function TFpPascalExpressionPartOperatorPlusMinus.DoGetResultValue: TFpValue;
|
|||||||
(AOtherVal.TypeInfo.TypeInfo.ReadSize(nil, s2)) and
|
(AOtherVal.TypeInfo.TypeInfo.ReadSize(nil, s2)) and
|
||||||
(s1 = s2)
|
(s1 = s2)
|
||||||
then begin
|
then begin
|
||||||
if s1 <> (APointerVal.Member[1].DataAddress.Address - APointerVal.DataAddress.Address) then begin
|
TmpVal := APointerVal.Member[1];
|
||||||
|
if s1 <> (TmpVal.DataAddress.Address - APointerVal.DataAddress.Address) then begin
|
||||||
|
TmpVal.ReleaseReference;
|
||||||
debugln('Size mismatch for pointer math');
|
debugln('Size mismatch for pointer math');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
TmpVal.ReleaseReference;
|
||||||
Idx := APointerVal.AsCardinal - AOtherVal.AsCardinal;
|
Idx := APointerVal.AsCardinal - AOtherVal.AsCardinal;
|
||||||
if SizeToFullBytes(s1) > 0 then begin
|
if SizeToFullBytes(s1) > 0 then begin
|
||||||
m := Idx mod SizeToFullBytes(s1);
|
m := Idx mod SizeToFullBytes(s1);
|
||||||
|
Loading…
Reference in New Issue
Block a user