netmail-open / wjelement

advanced, flexible JSON manipulation in C
GNU Lesser General Public License v3.0
108 stars 56 forks source link

Fix memory leak #101

Closed afuschetto closed 3 years ago

afuschetto commented 3 years ago

The WJEMemRelease function does not release memory as expected due to incorrect validation of the memory pointer passed as argument.

penduin commented 3 years ago

oh wow, yikes! good catch!

This function is thankfully a bit of an edge case; it doesn't even exist in our internal version of WJE, but it's easy to imagine wanting this for a cleanup callback. (And now, thanks to @afuschetto it will actually do its job. :^)