Skip to content

Commit f82a6d8

Browse files
committed
add early return if no pages to release
(as suggested by Vlad)
1 parent 9a8d47b commit f82a6d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/jrd/pag.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,12 @@ void PAG_release_pages(thread_db* tdbb, USHORT pageSpaceID, int cntRelease,
13051305
* Release a few pages to the free page page.
13061306
*
13071307
**************************************/
1308+
if (cntRelease <= 0)
1309+
{
1310+
// nothing to release
1311+
fb_assert(false);
1312+
return;
1313+
}
13081314
SET_TDBB(tdbb);
13091315
const auto* dbb = tdbb->getDatabase();
13101316

0 commit comments

Comments
 (0)