bschofield opened a new pull request #8312:
URL: https://github.com/apache/pulsar/pull/8312
Fixes #8311
### Motivation
The C/C++ glue code in *c_Producer.cc:handle_producer_send()* has a memory
leak. Specifically, a `pulsar_message_id_t` is created but never freed. This
leaks one object for every asynchronous message send, which adds up to a big
problem if sending lots of messages.
### Modifications
After calling the C callback, `delete` the memory allocated for the
`pulsar_message_id_t`.
### Verifying this change
I have manually verified that this change fixes the leak, using _valgrind_.
This change is a trivial rework / code cleanup without any test coverage.
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): no
- The public API: no
- The schema: no
- The default values of configurations: no
- The wire protocol: no
- The rest endpoints: no
- The admin cli options: no
- Anything that affects deployment: no
### Documentation
- Does this pull request introduce a new feature? no
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]