From f2fc523de7bfc33baf34f97d7ea2b5fa8fbe87d6 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 31 Jul 2011 17:11:28 +0200 Subject: [PATCH] Bugfix: fix memory leak in src/cmdparse.y --- src/cmdparse.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmdparse.y b/src/cmdparse.y index a8e190e7..d84023c3 100644 --- a/src/cmdparse.y +++ b/src/cmdparse.y @@ -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); -- 2.39.5