[scudo] Avoid QuarantineBatch leak in GlobalQuarantineRecycleInvalidCount (#232905)

In GlobalQuarantineRecycleInvalidCount,
Quarantine.drainAndRecycle(&Cache, Cb)
dequeues B from Cache before hitting the CHECK failure on B->Count. On
platforms where death tests execute in a thread within the same address
space
(such as Fuchsia zxtest), Cache is already empty after
SCUDO_EXPECT_DEATH
returns, so deallocateCache(&Cache) fails to free B and triggers a
LeakSanitizer failure.

Deallocate B directly via Cb.deallocate(B) instead.

GitOrigin-RevId: 253634e58aefd780a2612980a53c24c61e78c99c
1 file changed