haskell-works / hw-kafka-client

Kafka client for Haskell, including auto-rebalancing consumers
MIT License
140 stars 50 forks source link

newStablePtr without freeStablePtr leaks memory #143

Closed andrewthad closed 4 years ago

andrewthad commented 4 years ago

In produceMessage', newStablePtr is called. I cannot see anywhere where freeStablePtr or hs_free_stable_ptr are used in this library, which suggests that memory is being leaked.

AlexeyRaga commented 4 years ago

@andrewthad thanks for pointing!

It has been introduced in https://github.com/haskell-works/hw-kafka-client/pull/121, @felixmulder any hints/thoughts on it?

felixmulder commented 4 years ago

I think this'd fix it: https://github.com/haskell-works/hw-kafka-client/pull/145

felixmulder commented 4 years ago

Also, way to go in just perusing the code to find this 👏