mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ int main(int argc, char **argv)
|
||||||
QStringList arguments = QCoreApplication::arguments();
|
QStringList arguments = QCoreApplication::arguments();
|
||||||
|
|
||||||
// set a default logfile name for libdivecomputer so we always get a logfile
|
// 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();
|
const char *default_directory = system_default_directory();
|
||||||
subsurface_mkdir(default_directory);
|
subsurface_mkdir(default_directory);
|
||||||
|
|
Loading…
Add table
Reference in a new issue