if( ber == NULL ) {
perror( "ber_alloc_t" );
- ldap_unbind( ld );
+ ldap_unbind_ext( ld, NULL, NULL );
return EXIT_FAILURE;
}
if( rc < 0 ) {
perror( "ber_flatten2" );
- ldap_unbind( ld );
+ ldap_unbind_ext( ld, NULL, NULL );
return EXIT_FAILURE;
}
}
if( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_extended_operation" );
- ldap_unbind( ld );
+ ldap_unbind_ext( ld, NULL, NULL );
return EXIT_FAILURE;
}
if( ber == NULL ) {
perror( "ber_init" );
- ldap_unbind( ld );
+ ldap_unbind_ext( ld, NULL, NULL );
return EXIT_FAILURE;
}
skip:
/* disconnect from server */
- ldap_unbind (ld);
+ ldap_unbind_ext( ld, NULL, NULL );
return code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE;
}