[coreboot-gerrit] Change in coreboot[master]: util/msrtool: Exit program after displaying the help message

Maciej Sumi?ski (Code Review) gerrit at coreboot.org
Wed Aug 16 00:02:52 CEST 2017


Maciej Sumi?ski has uploaded this change for review. ( https://review.coreboot.org/21026


Change subject: util/msrtool: Exit program after displaying the help message
......................................................................

util/msrtool: Exit program after displaying the help message

In case there was no mode selected, sys and cpu variables were not
initialized, causing a segfault on exit (goto done).

Change-Id: I4a183c267e306598627c1612f4633f1e19019f3c
Signed-off-by: Maciej Suminski <maciej.suminski at cern.ch>
---
M util/msrtool/msrtool.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/21026/1

diff --git a/util/msrtool/msrtool.c b/util/msrtool/msrtool.c
index 4060ba3..b164695 100644
--- a/util/msrtool/msrtool.c
+++ b/util/msrtool/msrtool.c
@@ -417,7 +417,7 @@
 	if (optind == argc) {
 		syntax(argv);
 		printf("\nNo mode or address(es) specified!\n");
-		goto done;
+		return 0;
 	}
 
 	if (!found_system())

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a183c267e306598627c1612f4633f1e19019f3c
Gerrit-Change-Number: 21026
Gerrit-PatchSet: 1
Gerrit-Owner: Maciej Sumi?ski <maciej.suminski at cern.ch>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170815/613e19fe/attachment.html>


More information about the coreboot-gerrit mailing list