[Freeipa-devel] [PATCHES] 366-372 Additional Coverity fixes

Alexander Bokovoy abokovoy at redhat.com
Mon Nov 24 13:34:27 UTC 2014


On Mon, 10 Nov 2014, Jan Cholasta wrote:
>From 5cfc5d50ef7d2e42f10488ddf0d11fa405a8cb84 Mon Sep 17 00:00:00 2001
>From: Jan Cholasta <jcholast at redhat.com>
>Date: Mon, 10 Nov 2014 18:12:02 +0000
>Subject: [PATCH 6/7] Fix unchecked return value in ipa-join
>
>https://fedorahosted.org/freeipa/ticket/4651
>---
> 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 46f6457..ac8251f 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)
ACK

-- 
/ Alexander Bokovoy




More information about the Freeipa-devel mailing list