mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 10:07:56 -05:00
Some memory allocation cleanup.
This commit is contained in:
parent
d218a5ed5c
commit
0c36372134
2 changed files with 4 additions and 5 deletions
|
|
@ -398,7 +398,7 @@ ldap_int_sasl_open(
|
|||
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;
|
||||
|
||||
|
|
@ -419,7 +419,7 @@ ldap_int_sasl_open(
|
|||
|
||||
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 );
|
||||
|
|
|
|||
|
|
@ -427,10 +427,9 @@ try_read1msg(
|
|||
}
|
||||
#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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue