SiliconLabs / wiseconnect

Next-generation Silicon Labs Wi-Fi API for SiWx91x chipset family.
Other
15 stars 9 forks source link

fix memory leak in recv() #7

Open schoeler opened 1 year ago

schoeler commented 1 year ago

fix memory leak in recv() due to early return causing sl_91x_host_free_buffer() to never be called found during port from wiseconnect SDK 2.0 to wiseconnect SDK 3.0 causing malloc() failure after running for several minutes

schoeler commented 1 year ago

It appears the VERIFY_STATUS_AND_RETURN() pattern is used throughout the SDK codebase and by design, this memory leak could also occur in

I would recommend either removing the *_RETURN() pattern, or using the VERIFY_STATUS_AND_GOTO() pattern as used in sl_sntp.c

Please advise how to proceed with this.