Skip to content

Commit 9e04fde

Browse files
committed
- Don't make the winLibPath static. It will get garbage the next time since we free it in settings_rml.c:142.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15343 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent e735ef4 commit 9e04fde

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Compiler/runtime/settingsimpl.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const char* SettingsImpl__getInstallationDirectoryPath() {
9797
return path;
9898
}
9999

100-
static char* winLibPath = NULL;
100+
char* winLibPath = NULL;
101101

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

131131
#if defined(__MINGW32__) || defined(_MSC_VER)
132-
/* already set, set it only once! */
133-
if (winLibPath != NULL)
134-
return winLibPath;
135-
136132
/* adrpo: translate this to forward slashes! */
137133
/* duplicate the path */
138134
winLibPath = strdup(path);

0 commit comments

Comments
 (0)