From 6abe199c63218686b01426303d361c0cf8c00e25 Mon Sep 17 00:00:00 2001 From: Metin Cakircali Date: Tue, 3 Sep 2024 14:41:38 +0200 Subject: [PATCH] fix(Buffer): pass by ref --- src/eckit/io/Buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }