mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Fix error handling
This commit is contained in:
parent
053da4db7b
commit
661541fdfc
@ -146,6 +146,10 @@ ldap_passwd_s(
|
||||
}
|
||||
|
||||
rc = ldap_parse_passwd( ld, res, newpasswd );
|
||||
ldap_msgfree( res );
|
||||
return rc;
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_msgfree( res );
|
||||
return rc;
|
||||
}
|
||||
|
||||
return( ldap_result2error( ld, res, 1 ) );
|
||||
}
|
||||
|
@ -80,6 +80,10 @@ ldap_whoami_s(
|
||||
}
|
||||
|
||||
rc = ldap_parse_whoami( ld, res, authzid );
|
||||
ldap_msgfree( res );
|
||||
return rc;
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_msgfree( res );
|
||||
return rc;
|
||||
}
|
||||
|
||||
return( ldap_result2error( ld, res, 1 ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user