Skip to content

Commit

Permalink
downloader: copy logfile name
Browse files Browse the repository at this point in the history
At some places, this string is free()d, so it must not be
assigned a constant string.

Signed-off-by: Berthold Stoeger <[email protected]>
  • Loading branch information
bstoeger authored and atdotde committed Jan 26, 2021
1 parent b84baa8 commit 5c9f374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsurface-downloader-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5c9f374

Please sign in to comment.