FpDebug: fix mem-leak, if string looks like json, but is not.

This commit is contained in:
Martin 2023-06-19 14:01:13 +02:00
parent b99f4dc28d
commit b7ff978c70
2 changed files with 5 additions and 1 deletions

View File

@ -3436,6 +3436,10 @@ begin
RunToPause(BrkPrg);
t.Clear;
// test mem leaks // json content
t.Add('json ', '''[1,2]''', weAnsiStr('[1,2]','')).IgnTypeName.IgnKind;
t.Add('json ', '''[1,2,}]''', weAnsiStr('[1,2,}]','')).IgnTypeName.IgnKind;
// Constant values
t.Add('Const-Expr: 107', '107', weCardinal(107));
t.Add('Const-Expr: $10', '$10', weInteger(16));

View File

@ -409,7 +409,7 @@ begin
end;
if FResultDataContent = rdcNotSpecial then
FResultDataSpecialised := nil;
FreeAndNil(FResultDataSpecialised);
end;
end;