aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-downloader-main.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-26 18:41:55 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2021-01-26 20:20:09 +0100
commit5c9f3742ec73448b25d623db9436a4ea79e6ece6 (patch)
tree597e8f52aad9117732bee1f0880edacdb0482009 /subsurface-downloader-main.cpp
parentb84baa8a0dc2c312a6c9e668e3a7dd02de4730e7 (diff)
downloadsubsurface-5c9f3742ec73448b25d623db9436a4ea79e6ece6.tar.gz
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>
Diffstat (limited to 'subsurface-downloader-main.cpp')
-rw-r--r--subsurface-downloader-main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/subsurface-downloader-main.cpp b/subsurface-downloader-main.cpp
index 1936228c4..b8b65ffee 100644
--- a/subsurface-downloader-main.cpp
+++ b/subsurface-downloader-main.cpp
@@ -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();