cesanta / mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
https://mongoose-os.com
Other
2.51k stars 429 forks source link

Potential resource leaks #590

Closed ryancaicse closed 2 years ago

ryancaicse commented 2 years ago

Should a fclose(fp) be put before return at Line 44? https://github.com/cesanta/mongoose-os/blob/0be68369e7215791b03632fc133252d3fa04e499/src/common/cs_file.c#L41-L48

ryancaicse commented 2 years ago

Could you take a look? Many thanks. @mkmik

rojer commented 2 years ago

it's been fixed in https://github.com/cesanta/mongoose-os/commit/018961db7d7df3887c5e1fc51a5686600417e649, by none other than yourself :)