diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-10-04 09:48:18 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-20 04:42:51 -0700 |
commit | ea72ee454aea5e0f378275fe7114cf683b7db938 (patch) | |
tree | ab245a9371410119c9cb412bad6c3a672f1def3c /futility | |
parent | 3875e6191f24ceb83415f553ca91dcac7b71073b (diff) | |
download | vboot-ea72ee454aea5e0f378275fe7114cf683b7db938.tar.gz |
bdb: Fix uninitialized pointers
This change fixes errors reported by coreboot toolchain.
BUG=chromium:649554
BRANCH=none
TEST=make runtests
Change-Id: Icd61899718af64b3d199fff37bbea2ccec6ab2cd
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400666
Commit-Ready: Dan Shi <dshi@google.com>
Reviewed-by: Martin Roth <martinroth@chromium.org>
Diffstat (limited to 'futility')
-rw-r--r-- | futility/cmd_bdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/futility/cmd_bdb.c b/futility/cmd_bdb.c index ffd575b7..efe041b2 100644 --- a/futility/cmd_bdb.c +++ b/futility/cmd_bdb.c @@ -82,7 +82,7 @@ static int do_add(const char *bdb_filename, const char *data_filename, uint64_t offset, uint8_t partition, uint8_t type, uint64_t load_address) { - uint8_t *bdb, *data, *new_bdb; + uint8_t *bdb, *data, *new_bdb = NULL; uint32_t bdb_size, data_size; struct bdb_header *bdb_header; struct bdb_data *data_header; @@ -173,7 +173,7 @@ static int do_create(const char *bdb_filename, if (!bdb_filename || !bdbkey_pri_filename || !bdbkey_pub_filename || !datakey_pri_filename || !datakey_pub_filename) { fprintf(stderr, "Missing filenames\n"); - goto exit; + return rv; } /* Load keys */ |