From: Ding Fei Date: Fri, 4 Dec 2020 03:11:04 +0000 (+0800) Subject: ITS #9417 ldapexop exit with correct rc value X-Git-Tag: OPENLDAP_REL_ENG_2_5_1ALPHA~15^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66254781d2be99ea17bc3cf496496c312ce87f69;p=thirdparty%2Fopenldap.git 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. --- 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 ); }