Fix error handling

This commit is contained in:
Kurt Zeilenga 2002-11-28 04:36:22 +00:00
parent 053da4db7b
commit 661541fdfc
2 changed files with 12 additions and 4 deletions

View File

@ -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 ) );
}

View File

@ -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 ) );
}