From 6cee5cbeaf8214f9b924bf79306672e1a52f18ef Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 6 Jul 2018 23:28:33 -0400 Subject: parse: Add some missing failure messages --- parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parse.c b/parse.c index 36c8399..89a47b7 100644 --- a/parse.c +++ b/parse.c @@ -406,6 +406,7 @@ static int expr_open(struct parser_state *state, struct expr *expr, const char * struct open_file *ofile = malloc(sizeof(*ofile)); if (!ofile) { + perror("malloc()"); goto out_close; } @@ -3041,6 +3042,7 @@ struct cmdline *parse_cmdline(int argc, char *argv[]) { cmdline->argv = malloc((argc + 1)*sizeof(*cmdline->argv)); if (!cmdline->argv) { + perror("malloc()"); goto fail; } for (int i = 0; i <= argc; ++i) { -- cgit v1.2.3