emilk / loguru

A lightweight C++ logging library
The Unlicense
1.76k stars 256 forks source link

possible leaks in add_file function #234

Open darktrial opened 1 year ago

darktrial commented 1 year ago

There is no fclose after fopen for file variable.

fflush(file);
//fclose(file)<===missing!!
VLOG_F(g_internal_verbosity, "Logging to '" LOGURU_FMT(s) "', mode: '" LOGURU_FMT(s) "', verbosity: " LOGURU_FMT(d) "", path, mode_str, verbosity);
return true;