Skip to content

Commit

Permalink
DPL: fix leak in rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Mar 10, 2024
1 parent d43b949 commit a1497e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Framework/Core/src/CommonDataProcessors.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,7 @@ void retryMetricCallback(uv_async_t* async)
}
fair::mq::MessagePtr payload(device->NewMessage());
payload->Rebuild(&oldestPossingTimeslice, sizeof(int64_t), nullptr, nullptr);
auto* consumed = (size_t*)malloc(sizeof(size_t));
*consumed = oldestPossingTimeslice;
auto consumed = oldestPossingTimeslice;

int64_t result = channel->second[0].Send(payload, 100);
// If the sending worked, we do not retry.
Expand All @@ -592,7 +591,7 @@ void retryMetricCallback(uv_async_t* async)
// data will still happen.
uv_async_send(async);
} else {
lastTimeslice = *consumed;
lastTimeslice = consumed;
}
}

Expand Down

0 comments on commit a1497e7

Please sign in to comment.