diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2018-07-06 23:28:33 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2018-07-06 23:28:33 -0400 |
commit | 6cee5cbeaf8214f9b924bf79306672e1a52f18ef (patch) | |
tree | 8af6afb4681f9a3635b486ce6ff3a18956854395 | |
parent | 7e0cafb70135a68066ff72227613df9eeb2512fb (diff) | |
download | bfs-6cee5cbeaf8214f9b924bf79306672e1a52f18ef.tar.xz |
parse: Add some missing failure messages
-rw-r--r-- | parse.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) { |