diff options
author | Patrick Georgi <pgeorgi@chromium.org> | 2016-12-14 16:11:58 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-12-15 22:19:45 +0100 |
commit | 6b2d2db9eb514f6c54cf951fe864e052b680edef (patch) | |
tree | 7338fa2291953edc6f16a2a54f70af2036b3f27d /util/cbfstool | |
parent | 862df924e34927bb05f8d9fde10582789748cb7c (diff) |
util/cbfstool: check that buffer_create worked
We might not care much about this buffer, but we really use it later
on...
Change-Id: Ia16270f836d05d8b454e77de7b5babeb6bb05d6d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1294797
Reviewed-on: https://review.coreboot.org/17860
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/cbfstool')
-rw-r--r-- | util/cbfstool/cbfstool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 7a714275f7..d3c15e01fc 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -776,7 +776,8 @@ static int cbfs_create(void) struct buffer bootblock; if (!param.bootblock) { DEBUG("-B not given, creating image without bootblock.\n"); - buffer_create(&bootblock, 0, "(dummy)"); + if (buffer_create(&bootblock, 0, "(dummy)") != 0) + return 1; } else if (buffer_from_file(&bootblock, param.bootblock)) { return 1; } |