From d69b576d6b9a8a5c09ca3c5c8f2b262b67b6aa57 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 25 Nov 2012 13:55:29 +0100 Subject: [PATCH] Fix some uninitialized values --- parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parser.c b/parser.c index 325df24..1b6cc09 100644 --- a/parser.c +++ b/parser.c @@ -2287,7 +2287,7 @@ static bool parse_block_into(parser_t *parser, ast_block *block, bool warnreturn cleanup: if (!parser_leaveblock(parser)) retval = false; - return !!block; + return retval && !!block; } static ast_block* parse_block(parser_t *parser, bool warnreturn) @@ -3604,7 +3604,7 @@ skipvar: } if (parser->tok == '#') { - ast_function *func; + ast_function *func = NULL; if (localblock) { parseerror(parser, "cannot declare builtins within functions"); @@ -3647,7 +3647,8 @@ skipvar: if (!parser_next(parser)) { parseerror(parser, "expected comma or semicolon"); - ast_function_delete(func); + if (func) + ast_function_delete(func); var->constval.vfunc = NULL; break; } -- 2.39.2