fix memory leak
logfile_name was converted to std::string. Assigning a strdup()ed string to it will leak memory. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e39b42df53
commit
64d4de4a1b
@ -43,7 +43,7 @@ int main(int argc, char **argv)
|
||||
QStringList arguments = QCoreApplication::arguments();
|
||||
|
||||
// set a default logfile name for libdivecomputer so we always get a logfile
|
||||
logfile_name = strdup("subsurface-downloader.log");
|
||||
logfile_name = "subsurface-downloader.log";
|
||||
|
||||
const char *default_directory = system_default_directory();
|
||||
subsurface_mkdir(default_directory);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user