openldap: Fixed possible dereference of NULL pointer