Bugfix: fix memory leak in src/cmdparse.y

next
Michael Stapelberg 2011-07-31 17:11:28 +02:00
parent 6ef3866108
commit f2fc523de7
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int cmdyylex(struct context *context);
extern int cmdyyparse(void);
extern int cmdyylex_destroy(void);
extern FILE *cmdyyin;
YY_BUFFER_STATE cmdyy_scan_string(const char *);
@ -98,6 +99,7 @@ char *parse_cmd(const char *new) {
}
printf("done, json output = %s\n", json_output);
cmdyylex_destroy();
FREE(context->line_copy);
FREE(context->compact_error);
free(context);