diff --git a/src/eckit/io/Buffer.cc b/src/eckit/io/Buffer.cc index 139f882c3..635823bab 100644 --- a/src/eckit/io/Buffer.cc +++ b/src/eckit/io/Buffer.cc @@ -23,7 +23,7 @@ static char* allocate(const size_t size) { return size == 0 ? nullptr : new char[size]; } -static void deallocate(const char* buffer) { +static void deallocate(char*& buffer) { delete[] buffer; buffer = nullptr; }