--- linuxsampler/trunk/src/scriptvm/scanner.l 2020/11/09 10:18:55 3835 +++ linuxsampler/trunk/src/scriptvm/scanner.l 2020/11/28 14:47:14 3836 @@ -122,8 +122,10 @@ %% \"[^"]*\" { - yylval->sValue = strdup(yytext + 1); - yylval->sValue[strlen(yylval->sValue) - 1] = '\0'; + char* s = strdup(yytext + 1); + s[strlen(s) - 1] = '\0'; + yylval->sValue = s; + yyextra->autoFreeAfterParse(s); return STRING; } @@ -384,11 +386,13 @@ ("$"|"@"|"%"|"~"|"?"){ID} { yylval->sValue = strdup(yytext); + yyextra->autoFreeAfterParse(yylval->sValue); return VARIABLE; } {ID} { yylval->sValue = strdup(yytext); + yyextra->autoFreeAfterParse(yylval->sValue); return IDENTIFIER; }