Skip to content
Snippets Groups Projects
Commit 21da4412 authored by Lasse Tjernaes Wardenaer's avatar Lasse Tjernaes Wardenaer Committed by Jorge Camarero Vera
Browse files

Resolve "castor::tape::tapeserver::daemon::Payload not being deallocated in cta-readtp"

parent d6d54b42
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
## Summary
### Features
- cta/CTA#250 - Trim SQL query length in catalogue DB failure reason
- cta/CTA#301 - Switch from new to unique pointer in CtaReadTp to fix memory leak
### Bug Fixes
### Continuous Integration
......
......@@ -487,7 +487,7 @@ void ReadtpCmd::readTapeFile(
const size_t buffer_size = 1 * 1024 * 1024 * 1024; // 1Gb
size_t read_data_size = 0;
// allocate one gigabyte buffer
auto payload = new castor::tape::tapeserver::daemon::Payload(buffer_size);
auto payload = std::make_unique<castor::tape::tapeserver::daemon::Payload>(buffer_size);
try {
while (1) {
if (payload->remainingFreeSpace() <= reader->getBlockSize()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment