Skip to content

Commit

Permalink
- Don't make the winLibPath static. It will get garbage the next time…
Browse files Browse the repository at this point in the history
… since we free it in settings_rml.c:142.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15343 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Feb 26, 2013
1 parent e735ef4 commit 9e04fde
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Compiler/runtime/settingsimpl.c
Expand Up @@ -97,7 +97,7 @@ const char* SettingsImpl__getInstallationDirectoryPath() {
return path;
}

static char* winLibPath = NULL;
char* winLibPath = NULL;

// Do not free the returned variable. It's malloc'ed
char* SettingsImpl__getModelicaPath(int runningTestsuite) {
Expand Down Expand Up @@ -129,10 +129,6 @@ char* SettingsImpl__getModelicaPath(int runningTestsuite) {
}

#if defined(__MINGW32__) || defined(_MSC_VER)
/* already set, set it only once! */
if (winLibPath != NULL)
return winLibPath;

/* adrpo: translate this to forward slashes! */
/* duplicate the path */
winLibPath = strdup(path);
Expand Down

0 comments on commit 9e04fde

Please sign in to comment.