From 75e2adfb7385f3dd7ef41cbf94b0fa053c7dd225 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 16 Sep 2012 15:51:39 +0000 Subject: fix logic error when falling back to getting ranged attribute values for possibly binary attributes (thanks scan-build) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1770 ef36b2f9-881f-0410-afb5-c4e39611909c --- nslcd/myldap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nslcd/myldap.c') diff --git a/nslcd/myldap.c b/nslcd/myldap.c index 4bb1252..2333c01 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -1622,6 +1622,7 @@ const char **myldap_get_values_len(MYLDAP_ENTRY *entry,const char *attr) rc=LDAP_SUCCESS; if (ldap_set_option(entry->search->session->ld,LDAP_OPT_ERROR_NUMBER,&rc)!=LDAP_SUCCESS) log_log(LOG_WARNING,"failed to clear the error flag"); + return NULL; } else if (rc==LDAP_SUCCESS) { @@ -1633,10 +1634,12 @@ const char **myldap_get_values_len(MYLDAP_ENTRY *entry,const char *attr) values=set_tolist(set); } else + { myldap_err(LOG_WARNING,entry->search->session->ld,rc, "myldap_get_values_len() of attribute \"%s\" on entry \"%s\" returned NULL", attr,myldap_get_dn(entry)); - return NULL; + return NULL; + } } else { -- cgit v1.2.3