From 3a44b6a34c56005cd4e15d6f50bf3e85ffee2570 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Aug 2017 14:09:18 +0200 Subject: util/msrtool: Exit program after displaying the help message In case there is no mode selected, sys and cpu variables are not initialized, causing a segfault on exit (goto done). Change-Id: I4a183c267e306598627c1612f4633f1e19019f3c Signed-off-by: Maciej Suminski Reviewed-on: https://review.coreboot.org/21026 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) Reviewed-by: Pratikkumar V Prajapati --- util/msrtool/msrtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/msrtool/msrtool.c b/util/msrtool/msrtool.c index 4060ba3198..9be83f4129 100644 --- a/util/msrtool/msrtool.c +++ b/util/msrtool/msrtool.c @@ -417,7 +417,7 @@ int main(int argc, char *argv[]) { if (optind == argc) { syntax(argv); printf("\nNo mode or address(es) specified!\n"); - goto done; + return 1; } if (!found_system()) -- cgit v1.2.3