Skip to content

Commit

Permalink
- Avoid some more double-free
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10175 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 20, 2011
1 parent 636f8ef commit 289d997
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions FMI/import/source/moGenerator.c
Expand Up @@ -448,7 +448,7 @@ void instFmuModelDescription(ModelDescription* md, fmuModelDescription* fmuMD, f
void freeScalarVariableLst(fmiScalarVariable* list,int nsv){
int i;
for(i=0;i<nsv;i++){
free(list[i].variable);
/* free(list[i].variable); */
}
/* free(list); */
}
Expand Down Expand Up @@ -869,6 +869,7 @@ void blockcodegen(fmuModelDescription* fmuMD, const char* decompPath, const char
}

// Free memory
/*
free(id);
free((void*)x);
free((void*)nx);
Expand All @@ -885,13 +886,14 @@ void blockcodegen(fmuModelDescription* fmuMD, const char* decompPath, const char
free((void*)defaultVar);
free(pntReal);
/* free(tmpReal); */
free(tmpReal);
free(pntInteger);
free(tmpInteger);
free(pntBoolean);
free(tmpBoolean);
free(pntString);
free(tmpString);
*/
fclose(pfile);
}

Expand Down

0 comments on commit 289d997

Please sign in to comment.