Skip to content

Commit

Permalink
#1933. Fixed the exported FMUs fmiTerminate. Use functions.freeMemory…
Browse files Browse the repository at this point in the history
… instead of free.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13851 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Nov 9, 2012
1 parent 6eaf183 commit db461f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SimulationRuntime/fmi/export/fmu_model_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ void fmiFreeModelInstance(fmiComponent c) {
if (comp->loggingOn) comp->functions.logger(c, comp->instanceName, fmiOK, "log",
"fmiFreeModelInstance");

//DeinitializeDataStruc(comp->fmuData); /* is already done in fmiTerminate. */
comp->functions.freeMemory(comp);
}

Expand Down Expand Up @@ -649,7 +648,7 @@ fmiStatus fmiTerminate(fmiComponent c){
/* deinitDelay(comp->fmuData); */
callExternalObjectDestructors(comp->fmuData);
deInitializeDataStruc(comp->fmuData);
free(comp->fmuData);
comp->functions.freeMemory(comp->fmuData);

comp->state = modelTerminated;
return fmiOK;
Expand Down

0 comments on commit db461f3

Please sign in to comment.