wldap32: Handle NULL return in ldap_get_values_lenW.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2020-03-23 21:14:22 +08:00 committed by Alexandre Julliard
parent 364ac6787a
commit 3c3d0f6f00
1 changed files with 7 additions and 5 deletions

View File

@ -229,12 +229,14 @@ PWCHAR * CDECL ldap_get_valuesW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry, P
if (!attrU) return NULL;
bv = ldap_get_values_len( ld, entry, attrU );
if (bv)
{
retU = bv2str_array( bv );
ret = strarrayUtoW( retU );
retU = bv2str_array( bv );
ret = strarrayUtoW( retU );
ldap_value_free_len( bv );
strarrayfreeU( retU );
ldap_value_free_len( bv );
strarrayfreeU( retU );
}
strfreeU( attrU );
#endif