downloader: copy logfile name

At some places, this string is free()d, so it must not be
assigned a constant string.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-26 18:41:55 +01:00 committed by Robert C. Helling
parent b84baa8a0d
commit 5c9f3742ec

View file

@ -46,7 +46,7 @@ int main(int argc, char **argv)
struct filter_preset_table presets;
// set a default logfile name for libdivecomputer so we always get a logfile
logfile_name = "subsurface-downloader.log";
logfile_name = strdup("subsurface-downloader.log");
const char *default_directory = system_default_directory();
const char *default_filename = system_default_filename();