From 454f69d862742650627c1e0a16985fb33c41418c Mon Sep 17 00:00:00 2001 From: Ziyue Xu Date: Tue, 11 Jun 2024 13:51:16 -0400 Subject: [PATCH] free buffer --- src/collective/aggregator.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/collective/aggregator.h b/src/collective/aggregator.h index 9f9028c8e25b..e9314b49b64e 100644 --- a/src/collective/aggregator.h +++ b/src/collective/aggregator.h @@ -132,6 +132,9 @@ void ApplyWithLabels(Context const*, MetaInfo const& info, HostDeviceVector* // call HandleGHPairs size_t size; processor_instance->HandleGHPairs(&size, buffer, buffer_size); + + // free the buffer + free(buffer); } else { // clear text mode, broadcast the data directly result->Resize(size);