Commit 35dc94bc authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

wldap32: Fix memory leak on error path in ldap_start_tls_sW (scan-build).

parent 7b69313b
...@@ -450,14 +450,12 @@ ULONG CDECL ldap_start_tls_sW( LDAP *ld, ULONG *retval, LDAPMessage **result, LD ...@@ -450,14 +450,12 @@ ULONG CDECL ldap_start_tls_sW( LDAP *ld, ULONG *retval, LDAPMessage **result, LD
} }
if (!ld) return ~0u; if (!ld) return ~0u;
if (CONNECTED(ld)) return WLDAP32_LDAP_LOCAL_ERROR;
if (serverctrls && !(serverctrlsU = controlarrayWtoU( serverctrls ))) goto exit; if (serverctrls && !(serverctrlsU = controlarrayWtoU( serverctrls ))) goto exit;
if (clientctrls && !(clientctrlsU = controlarrayWtoU( clientctrls ))) goto exit; if (clientctrls && !(clientctrlsU = controlarrayWtoU( clientctrls ))) goto exit;
else
{ ret = map_error( ldap_start_tls_s( CTX(ld), serverctrlsU, clientctrlsU ) );
if (CONNECTED(ld)) return WLDAP32_LDAP_LOCAL_ERROR;
ret = map_error( ldap_start_tls_s( CTX(ld), serverctrlsU, clientctrlsU ) );
}
exit: exit:
controlarrayfreeU( serverctrlsU ); controlarrayfreeU( serverctrlsU );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment