From e6f71d031a114cd8fbd752e1ce8e2a02007a009b Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 10 Nov 2014 18:12:02 +0000 Subject: [PATCH] Fix unchecked return value in ipa-join https://fedorahosted.org/freeipa/ticket/4713 Reviewed-By: Alexander Bokovoy --- ipa-client/ipa-join.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipa-client/ipa-join.c b/ipa-client/ipa-join.c index 46f64572dcaeb3be61dadf87a07520ad21fb4f47..ac8251fef3b0a03de0920e8732b44bac208f55a6 100644 --- a/ipa-client/ipa-join.c +++ b/ipa-client/ipa-join.c @@ -208,8 +208,11 @@ connect_ldap(const char *hostname, const char *binddn, const char *bindpw) { struct berval bindpw_bv; if (debug) { - ldapdebug=2; + ldapdebug = 2; ret = ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &ldapdebug); + if (ret != LDAP_OPT_SUCCESS) { + goto fail; + } } if (ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, CAFILE) != LDAP_OPT_SUCCESS) -- 2.1.0