-------------------------- src/lrstar/PG_Generate.cpp --------------------------
index d72b551..a262076 100644
@@ -2561,6 +2561,7 @@ static void instantiate_main(FILE *fp, const char *grammar)
" delete [] input_start;\n"
" }\n\n"
" fclose(output_fp);\n"
+ " free(options.output);\n"
" return 0;\n"
"}\n"
"\n");
There is still one memory leak from
C_user_main.cppfor thestrdupin this lineopts->output = strdup(optarg);bellow is a fix for it.