From 8e738d7506c2f4b2e5f6adaf8ca95a63468054d5 Mon Sep 17 00:00:00 2001 From: Ding Fei <fei.ding@ustchcs.com> Date: Fri, 4 Dec 2020 11:11:04 +0800 Subject: [PATCH] ITS #9417 ldapexop exit with correct rc value `rc` collects exit status all the way down but is not used at all? If `code` comparison at exit is intended then there exists some path that leaves it in garbage value, say when `ldap_whoami` or `ldap_cancel` fails. --- clients/tools/ldapexop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/tools/ldapexop.c b/clients/tools/ldapexop.c index f4ecf04d04..27ba39669e 100644 --- a/clients/tools/ldapexop.c +++ b/clients/tools/ldapexop.c @@ -351,5 +351,5 @@ skip: /* disconnect from server */ if ( res ) ldap_msgfree( res ); - tool_exit( ld, code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE ); + tool_exit( ld, rc ); } -- GitLab