Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This input plugin connects to one or more ZeroMQ publishers and publish these messages verbatim into the metadata stream (only supported by the ZeroMQ writer).
I am a bit out of touch with coding c so please take a look so I have not done any obvious memory corruptions/bugs. I know line 147 in _zeromq_relay.c is dangerous but it works now due to mde_publish_event_obj is a syncrhonous call, is there any plans on making this asynch ? if so the buffer used needs to be created on the heap (and thus freed in writer_zeromq.c).
The code is tested on node 232 and it works as expected (ie I can turn off subscribers publishers at will and it continues to work without crashing)
I have attached the ouput from a valgrind run with these checks (valgrind --leak-check=yes ./meta_exporter -c /home/jk/monroe/m.conf)
valgrind.log
m.conf.txt