Fix for MD5 leak bug, issue #7195 by lrodorigo · Pull Request #7197 · esp8266/Arduino
Added the free before the return.
I was wondering if a more "C++ish" resource handling could be fine for you (e.g. buffer as unique_ptr).
Fixes #7195
@lrodorigo I wouldn't mind a unique_ptr solution at all, at the very least it would be one small step towards exception friendly code.
@lrodorigo ping? will you be reworking this with a smart ptr?
Sorry, I read quickly your message and I misunderstood your message.
I can try to rework for a smart_ptr, no-except code. I can start to work on it after easter holidays.
I can try to rework for a smart_ptr, no-except code. I can start to work on it after easter holidays.
That will be nice !
We are going to merge this fix now because it solves a bug,
then when you're ready you can post another pull request using unique_ptr<>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters