Skip to content

Commit

Permalink
Move release()
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Sep 7, 2023
1 parent 5b16724 commit 5511760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/piscsi/piscsi_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void PiscsiResponse::GetDevice(const Device& device, PbDevice& pb_device, const

pb_device.set_allocated_properties(GetDeviceProperties(device).release());

auto status = make_unique<PbDeviceStatus>().release(); //NOSONAR The allocated memory is managed by protobuf
pb_device.set_allocated_status(status);
auto status = make_unique<PbDeviceStatus>();
pb_device.set_allocated_status(status.release());
status->set_protected_(device.IsProtected());
status->set_stopped(device.IsStopped());
status->set_removed(device.IsRemoved());
Expand Down

0 comments on commit 5511760

Please sign in to comment.