]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Fix unbalanced new[]/delete[] in read_bdev_label functions 55374/head
authorAdam Kupczyk <akupczyk@ibm.com>
Thu, 25 Jul 2024 12:42:43 +0000 (12:42 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Thu, 25 Jul 2024 12:45:01 +0000 (12:45 +0000)
Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
src/os/bluestore/BlueStore.cc

index 84fe6efda4f54c8fa29df5938609b5608938d454..e83982ea2a4867485c32f0bdd5b9e2d2a499b72a 100644 (file)
@@ -6600,7 +6600,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<char> buf(new char[BDEV_LABEL_BLOCK_SIZE]);
+  unique_ptr<char[]> 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