[coreboot-gerrit] Change in coreboot[master]: soc/intel/cannonlake: Keep variable from going out of scope

Martin Roth (Code Review) gerrit at coreboot.org
Fri Jul 21 17:18:08 CEST 2017


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/20682


Change subject: soc/intel/cannonlake: Keep variable from going out of scope
......................................................................

soc/intel/cannonlake: Keep variable from going out of scope

The variable p was going out of scope while still being pointed to by
*cpu_name.

Fix coverity ID 1378215 (Pointer to local outside scope)

Change-Id: I6ad7b1919104b4d97869efe5065e39c2a43de638
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/soc/intel/cannonlake/bootblock/report_platform.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/20682/1

diff --git a/src/soc/intel/cannonlake/bootblock/report_platform.c b/src/soc/intel/cannonlake/bootblock/report_platform.c
index c508142..7bc93e6 100644
--- a/src/soc/intel/cannonlake/bootblock/report_platform.c
+++ b/src/soc/intel/cannonlake/bootblock/report_platform.c
@@ -68,13 +68,13 @@
 	msr_t microcode_ver;
 	static const char * const mode[] = {"NOT ", ""};
 	const char *cpu_type = "Unknown";
+	u32 p[13];
 
 	index = 0x80000000;
 	cpuidr = cpuid(index);
 	if (cpuidr.eax < 0x80000004) {
 		strcpy(cpu_string, "Platform info not available");
 	} else {
-		u32 p[13];
 		int j=0;
 
 		for (i = 2; i <= 4; i++) {

-- 
To view, visit https://review.coreboot.org/20682
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ad7b1919104b4d97869efe5065e39c2a43de638
Gerrit-Change-Number: 20682
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170721/934d4193/attachment.html>


More information about the coreboot-gerrit mailing list