From cd1add1f3c0c7b638a20b810822838c5ecb7bc2d Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 9 Aug 2011 08:41:42 +0200 Subject: [PATCH] =?UTF-8?q?Bugfix:=20don=E2=80=99t=20free=20the=20old=20js?= =?UTF-8?q?on=5Foutput,=20the=20caller=20does=20that?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cmdparse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmdparse.y b/src/cmdparse.y index 32558f2e..9b63ff0c 100644 --- a/src/cmdparse.y +++ b/src/cmdparse.y @@ -81,13 +81,13 @@ int cmdyywrap() { } char *parse_cmd(const char *new) { + json_output = NULL; LOG("COMMAND: *%s*\n", new); cmdyy_scan_string(new); match_init(¤t_match); context = scalloc(sizeof(struct context)); context->filename = "cmd"; - FREE(json_output); if (cmdyyparse() != 0) { fprintf(stderr, "Could not parse command\n"); asprintf(&json_output, "{\"success\":false, \"error\":\"%s at position %d\"}",