lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 8 Apr 2021 19:24:44 +0800
From:   Zhihao Cheng <chengzhihao1@...wei.com>
To:     <mingo@...hat.com>, <acme@...nel.org>
CC:     <linux-kernel@...r.kernel.org>, <chengzhihao1@...wei.com>,
        <yi.zhang@...wei.com>, <yukuai3@...wei.com>
Subject: [PATCH] perf tools: Fix error return code in cmd_buildid_cache()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: e3ed75bb537a8 ("perf buildid-cache: Move session...")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@...wei.com>
---
 tools/perf/builtin-buildid-cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index ecd0d3cb6f5c..f703ba11e12c 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -448,7 +448,8 @@ int cmd_buildid_cache(int argc, const char **argv)
 			return PTR_ERR(session);
 	}
 
-	if (symbol__init(session ? &session->header.env : NULL) < 0)
+	ret = symbol__init(session ? &session->header.env : NULL);
+	if (ret < 0)
 		goto out;
 
 	setup_pager();
-- 
2.25.4

Powered by blists - more mailing lists