Please correct me if i am wrong.
I have noticed a issue regarding freeing dynamically allocated memory for "buffer" when user application returns false to "flush".
at line number 211 ("logger_spiffs.cpp") and 271 ("logger_sd.cpp"), we are returning with false without freeing "buffer".
either we can call free(buffer) at this line or simply we can avoid/comment "return false" statement. because anyway we are returning status of "successFlush" at bottom which is already tagged as "false".
probably, this could be better idea to allocate memory using char buffer[sizeLimitPerChunk];
I don't know if all platform can handle it, but ESP32+Arduino can handle this way.
Hi,
Appreciated your effort for this library.
Please correct me if i am wrong. I have noticed a issue regarding freeing dynamically allocated memory for "buffer" when user application returns false to "flush". at line number 211 ("logger_spiffs.cpp") and 271 ("logger_sd.cpp"), we are returning with false without freeing "buffer".
either we can call free(buffer) at this line or simply we can avoid/comment "return false" statement. because anyway we are returning status of "successFlush" at bottom which is already tagged as "false".
probably, this could be better idea to allocate memory using char buffer[sizeLimitPerChunk]; I don't know if all platform can handle it, but ESP32+Arduino can handle this way.
Regards, Umesh