--- branches/development/src/utils/StringUtils.cpp 2013/02/20 15:39:39 1850 +++ branches/development/src/utils/StringUtils.cpp 2013/05/15 15:09:35 1874 @@ -183,11 +183,15 @@ namespace OpenMD { foo = strtok(working_line, " ,;\t"); if (foo != NULL) { - - if (!strcasecmp(foo, "end")) return 1; + + if (!strcasecmp(foo, "end")) { + free(working_line); + return 1; + } } + free(working_line); return 0; }