mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Fix nullptr deref
This commit is contained in:
parent
d5fae3d16b
commit
09b75901f0
@ -82,6 +82,9 @@ private:
|
||||
ReservationPtr reserve(uint64_t bytes)
|
||||
{
|
||||
ReservationPtr reservation = disk->reserve(bytes);
|
||||
if (!reservation)
|
||||
return {};
|
||||
|
||||
/// Not just subtract bytes, but update the value,
|
||||
/// since some reservations may be done directly via IDisk, or not by ClickHouse.
|
||||
free_size = reservation->getUnreservedSpace();
|
||||
|
Loading…
Reference in New Issue
Block a user