Aarya Chaumal has uploaded this change for review.

View Change

libflashrom.c: fixed unintialized value passed to function

In function flash_layouy_read_from_ifd variable chip_layout remains uninitialized if prepare_flash_access returns
flase. This unintialzed value is passed to flashrom_layout_release later.

Change-Id: Iacbd7bf9cdf897cc2a732c1dc6568845a4ab804d
Signed-off-by: Aarya Chaumal <aarya.chaumal@gmail.com>
---
M libflashrom.c
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/25/62725/1
diff --git a/libflashrom.c b/libflashrom.c
index f2288fe..7e0f852 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -442,7 +442,7 @@
#ifndef __FLASHROM_LITTLE_ENDIAN__
return 6;
#else
- struct flashrom_layout *dump_layout, *chip_layout;
+ struct flashrom_layout *dump_layout=0, *chip_layout=0;
int ret = 1;

void *const desc = malloc(0x1000);

To view, visit change 62725. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iacbd7bf9cdf897cc2a732c1dc6568845a4ab804d
Gerrit-Change-Number: 62725
Gerrit-PatchSet: 1
Gerrit-Owner: Aarya Chaumal <aarya.chaumal@gmail.com>
Gerrit-MessageType: newchange