Skip to content

Commit 64f6b5d

Browse files
committed
os/bluestore: Fix unbalanced new[]/delete[] in read_bdev_label functions
Signed-off-by: Adam Kupczyk <[email protected]>
1 parent 811f297 commit 64f6b5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6600,7 +6600,7 @@ int BlueStore::_read_bdev_label(
66006600
dout(10) << __func__ << " position=0x" << std::hex << disk_position << std::dec << dendl;
66016601
ceph_assert(bdev);
66026602
bufferlist bl;
6603-
unique_ptr<char> buf(new char[BDEV_LABEL_BLOCK_SIZE]);
6603+
unique_ptr<char[]> buf(new char[BDEV_LABEL_BLOCK_SIZE]);
66046604
uint64_t dev_size = bdev->get_size();
66056605
if (dev_size < disk_position + BDEV_LABEL_BLOCK_SIZE) {
66066606
dout(10) << __func__ << " position=0x" << std::hex << disk_position

0 commit comments

Comments
 (0)