From 8cbebaea5c2dc79a5f37cf4fcf75d3125ed35252 Mon Sep 17 00:00:00 2001 From: Dmitry Yemanov Date: Sat, 2 Oct 2021 20:34:09 +0300 Subject: [PATCH] Fixed double release of the attachment (postfix for #6886 by Alex) --- src/jrd/validation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jrd/validation.cpp b/src/jrd/validation.cpp index 64c459a717..c7a05417c4 100644 --- a/src/jrd/validation.cpp +++ b/src/jrd/validation.cpp @@ -735,8 +735,7 @@ static int validate(Firebird::UtilSvc* svc) FbLocalStatus status; AutoPlugin jProv(JProvider::getInstance()); - RefPtr jAtt; - jAtt.assignRefNoIncr(jProv->attachDatabase(&status, expandedFilename.c_str(), dpb.getBufferLength(), dpb.getBuffer())); + RefPtr jAtt(jProv->attachDatabase(&status, expandedFilename.c_str(), dpb.getBufferLength(), dpb.getBuffer())); if (status->getState() & IStatus::STATE_ERRORS) {