Hans Leidekker (@hans) commented about dlls/wldap32/add.c:
TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), attrs, serverctrls, clientctrls, message ); if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
- if ((ret = WLDAP32_ldap_connect( ld, NULL ))) return ret;
'ret' is initialized at the top in order to return the right error on allocation failure. I would move it right before parameter conversion. Applies to many other functions as well.