mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 19:49:35 -05:00
Fix error handling
This commit is contained in:
parent
053da4db7b
commit
661541fdfc
2 changed files with 12 additions and 4 deletions
|
|
@ -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 a new issue