8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 23:23:02 +01:00

Fixed double release of the attachment (postfix for #6886 by Alex)

This commit is contained in:
Dmitry Yemanov 2021-10-02 20:34:09 +03:00
parent 7fda66744d
commit 3c8077058a

View File

@ -735,8 +735,7 @@ static int validate(Firebird::UtilSvc* svc)
FbLocalStatus status;
AutoPlugin<JProvider> jProv(JProvider::getInstance());
RefPtr<JAttachment> jAtt;
jAtt.assignRefNoIncr(jProv->attachDatabase(&status, expandedFilename.c_str(), dpb.getBufferLength(), dpb.getBuffer()));
RefPtr<JAttachment> jAtt(jProv->attachDatabase(&status, expandedFilename.c_str(), dpb.getBufferLength(), dpb.getBuffer()));
if (status->getState() & IStatus::STATE_ERRORS)
{