* Merging revisions r47343,r47344 from trunk:

------------------------------------------------------------------------
    r47343 | michael | 2020-11-08 18:05:01 +0100 (Sun, 08 Nov 2020) | 1 line
    
    * Fix bug #37852, possible memleak
    ------------------------------------------------------------------------
    r47344 | michael | 2020-11-08 18:10:07 +0100 (Sun, 08 Nov 2020) | 1 line
    
    * Correct line number
    ------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@49320 -
This commit is contained in:
michael 2021-05-01 16:16:57 +00:00
parent c6175fdd3a
commit 72195c84ef
2 changed files with 11 additions and 6 deletions

View File

@ -392,13 +392,16 @@ end;
destructor TFBAdmin.Destroy;
begin
if FSvcHandle<>FB_API_NULLHANDLE then
begin
WaitInterval:=100;
DisConnect;
try
if FSvcHandle<>FB_API_NULLHANDLE then
begin
WaitInterval:=100;
DisConnect; // This can raise an exception
end;
Finally
FOutput.Destroy;
inherited Destroy;
end;
FOutput.Destroy;
inherited Destroy;
end;
function TFBAdmin.Connect: boolean;

View File

@ -185,6 +185,8 @@ constructor TJSONScanner.Create(const aSource: RawByteString; AOptions: TJSONOpt
begin
FSource:=aSource;
FCurPos:=PAnsiChar(FSource);
if FCurPos<>Nil then
FCurRow:=1;
FOptions:=AOptions;
end;