Skip to content
Snippets Groups Projects
Commit f09ba82c authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Import memory leak plugs from HEAD

parent ac7d24b6
No related branches found
No related tags found
No related merge requests found
......@@ -418,6 +418,7 @@ ldap_int_sasl_open(
rc = sasl_client_new( "ldap", host, session_callbacks,
SASL_SECURITY_LAYER, &ctx );
ber_memfree( session_callbacks );
if ( rc != SASL_OK ) {
ld->ld_errno = sasl_err2ldap( rc );
......
......@@ -324,6 +324,7 @@ ldap_int_open_connection(
#ifdef HAVE_CYRUS_SASL
if( sasl_host != NULL ) {
ldap_int_sasl_open( ld, conn, sasl_host, sasl_ssf );
LDAP_FREE( sasl_host );
}
#endif
......
......@@ -128,6 +128,26 @@ ldap_ld_free(
ld->ld_options.ldo_tm_net = NULL;
}
if ( ld->ld_options.ldo_def_sasl_mech != NULL ) {
LDAP_FREE( ld->ld_options.ldo_def_sasl_mech );
ld->ld_options.ldo_def_sasl_mech = NULL;
}
if ( ld->ld_options.ldo_def_sasl_realm != NULL ) {
LDAP_FREE( ld->ld_options.ldo_def_sasl_realm );
ld->ld_options.ldo_def_sasl_realm = NULL;
}
if ( ld->ld_options.ldo_def_sasl_authcid != NULL ) {
LDAP_FREE( ld->ld_options.ldo_def_sasl_authcid );
ld->ld_options.ldo_def_sasl_authcid = NULL;
}
if ( ld->ld_options.ldo_def_sasl_authzid != NULL ) {
LDAP_FREE( ld->ld_options.ldo_def_sasl_authzid );
ld->ld_options.ldo_def_sasl_authzid = NULL;
}
ber_sockbuf_free( ld->ld_sb );
LDAP_FREE( (char *) ld );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment