summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-12-14 16:10:00 +0100
committerPatrick Georgi <pgeorgi@google.com>2016-12-15 22:19:17 +0100
commit862df924e34927bb05f8d9fde10582789748cb7c (patch)
treeff4d263897e31286b61422767ff766a871335a04 /util
parenta2ce710df749f06bcdfa95329491046870f3c729 (diff)
downloadcoreboot-862df924e34927bb05f8d9fde10582789748cb7c.tar.xz
util/cbfstool: Fix memory leak
Change-Id: I66cb1c88155ef58610bacfb899e0132e4143c7ac Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1325836 Reviewed-on: https://review.coreboot.org/17859 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util')
-rw-r--r--util/cbfstool/cbfs_image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index ee229b365d..c34ca8366c 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -1411,6 +1411,7 @@ int cbfs_print_entry_info(struct cbfs_image *image, struct cbfs_file *entry,
ntohl(entry->len), hash_type, local_hash,
hash_len) != VB2_SUCCESS) {
fprintf(fp, "failed to hash '%s'\n", name);
+ free(hash_str);
break;
}
int valid = memcmp(local_hash, hash->hash_data, hash_len) == 0;