From: Michael Stapelberg Date: Sun, 31 Jul 2011 15:11:28 +0000 (+0200) Subject: Bugfix: fix memory leak in src/cmdparse.y X-Git-Tag: 4.0~14^2~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f2fc523de7bfc33baf34f97d7ea2b5fa8fbe87d6;p=i3%2Fi3 Bugfix: fix memory leak in src/cmdparse.y --- 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);