mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#7757 plug memleak
This commit is contained in:
parent
1fcd116219
commit
f8efeb4278
@ -567,8 +567,11 @@ ldap_int_sasl_bind(
|
|||||||
ctx = ld->ld_defconn->lconn_sasl_authctx;
|
ctx = ld->ld_defconn->lconn_sasl_authctx;
|
||||||
|
|
||||||
rc = ldap_parse_sasl_bind_result( ld, result, &scred, 0 );
|
rc = ldap_parse_sasl_bind_result( ld, result, &scred, 0 );
|
||||||
if ( rc != LDAP_SUCCESS )
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
|
if ( scred )
|
||||||
|
ber_bvfree( scred );
|
||||||
goto done;
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
rc = ldap_result2error( ld, result, 0 );
|
rc = ldap_result2error( ld, result, 0 );
|
||||||
if ( rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS ) {
|
if ( rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS ) {
|
||||||
@ -584,8 +587,11 @@ ldap_int_sasl_bind(
|
|||||||
}
|
}
|
||||||
|
|
||||||
mech = *rmech;
|
mech = *rmech;
|
||||||
if ( rc == LDAP_SUCCESS && mech == NULL )
|
if ( rc == LDAP_SUCCESS && mech == NULL ) {
|
||||||
|
if ( scred )
|
||||||
|
ber_bvfree( scred );
|
||||||
goto success;
|
goto success;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if( ! scred ) {
|
if( ! scred ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user