sasl_conn_t *ctx;
sasl_callback_t *session_callbacks =
- ber_memcalloc( 2, sizeof( sasl_callback_t ) );
+ LDAP_CALLOC( 2, sizeof( sasl_callback_t ) );
if( session_callbacks == NULL ) return LDAP_NO_MEMORY;
rc = sasl_client_new( "ldap", host, session_callbacks,
SASL_SECURITY_LAYER, &ctx );
- ber_memfree( session_callbacks );
+ LDAP_FREE( session_callbacks );
if ( rc != SASL_OK ) {
ld->ld_errno = sasl_err2ldap( rc );
}
#ifdef LDAP_CONNECTIONLESS
if (LDAP_IS_UDP(ld) && ld->ld_options.ldo_version == LDAP_VERSION2) {
- char *blank;
+ char *blank = NULL;
ber_scanf(ber, "a{", &blank);
- if (blank)
- ber_memfree(blank);
+ if (blank) ber_memfree(blank);
}
#endif
/* the message type */