fix minor memory leak
[ccc.git] / parse.y
diff --git a/parse.y b/parse.y
index 3cc1d44..33e9881 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -64,7 +64,7 @@ decls
        | decls fundecl { $$ = list_cons($2, $1); }
        ;
 vardecl
-       : VAR IDENT ASSIGN expr { $$ = vardecl($2, $4); }
+       : VAR IDENT ASSIGN expr { $$ = (struct vardecl) {.ident=$2, .expr=$4}; }
        ;
 fundecl
        : IDENT BOPEN args BCLOSE COPEN body CCLOSE