diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2012-09-16 17:51:39 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2012-09-16 17:51:39 +0200 |
commit | 75e2adfb7385f3dd7ef41cbf94b0fa053c7dd225 (patch) | |
tree | da04ff262c3bc389f05d8008c7592733133d28f7 /nslcd/myldap.c | |
parent | e918dde1a1789e49ca030bb74a15e29cfc83c0f1 (diff) |
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
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r-- | nslcd/myldap.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |