From 862df924e34927bb05f8d9fde10582789748cb7c Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 14 Dec 2016 16:10:00 +0100 Subject: util/cbfstool: Fix memory leak Change-Id: I66cb1c88155ef58610bacfb899e0132e4143c7ac Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1325836 Reviewed-on: https://review.coreboot.org/17859 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel --- util/cbfstool/cbfs_image.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3