From 9aa72c90a425524ee87a8231ecd1c12d5d4f6ee2 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Thu, 25 Jul 2024 12:42:43 +0000 Subject: [PATCH] os/bluestore: Fix unbalanced new[]/delete[] in read_bdev_label functions Signed-off-by: Adam Kupczyk (cherry picked from commit 64f6b5d1d7ecab9f17d6d32424fdab536b7a5a93) --- src/os/bluestore/BlueStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 0f659d951b55a..30023e81cb346 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -6583,7 +6583,7 @@ int BlueStore::_read_bdev_label( dout(10) << __func__ << " position=0x" << std::hex << disk_position << std::dec << dendl; ceph_assert(bdev); bufferlist bl; - unique_ptr buf(new char[BDEV_LABEL_BLOCK_SIZE]); + unique_ptr buf(new char[BDEV_LABEL_BLOCK_SIZE]); uint64_t dev_size = bdev->get_size(); if (dev_size < disk_position + BDEV_LABEL_BLOCK_SIZE) { dout(10) << __func__ << " position=0x" << std::hex << disk_position -- 2.39.5