X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fwhoami.c;h=f77ebb5069b5b6da6314acff0b9fba53034f1ab7;hb=c3e28a5488a8011ef0352f48fca85c48679205ba;hp=851f6659f0bf0a943a6b6471bac170f74b72484e;hpb=da6d9eb0463255782f3fa70c61fd958d94c048cf;p=openldap diff --git a/libraries/libldap/whoami.c b/libraries/libldap/whoami.c index 851f6659f0..f77ebb5069 100644 --- a/libraries/libldap/whoami.c +++ b/libraries/libldap/whoami.c @@ -88,7 +88,7 @@ ldap_whoami_s( rc = ldap_whoami( ld, sctrls, cctrls, &msgid ); if ( rc != LDAP_SUCCESS ) return rc; - if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 ) { + if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res ) { return ld->ld_errno; }