Skip to content

Commit 72895f9

Browse files
committed
Fixed bug #8283 : Assert in ~thread_db() due to not released page buffer
1 parent d7e73b7 commit 72895f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/jrd/btr.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ USHORT BTR_all(thread_db* tdbb, jrd_rel* relation, IndexDescAlloc** csb_idx, Rel
367367
if (!root)
368368
return 0;
369369

370+
Cleanup release_root([&] {
371+
CCH_RELEASE(tdbb, &window);
372+
});
373+
370374
delete *csb_idx;
371375
*csb_idx = FB_NEW_RPT(*tdbb->getDefaultPool(), root->irt_count) IndexDescAlloc();
372376

@@ -377,8 +381,6 @@ USHORT BTR_all(thread_db* tdbb, jrd_rel* relation, IndexDescAlloc** csb_idx, Rel
377381
if (BTR_description(tdbb, relation, root, &buffer[count], i))
378382
count++;
379383
}
380-
381-
CCH_RELEASE(tdbb, &window);
382384
return count;
383385
}
384386

0 commit comments

Comments
 (0)