Commit 74eb4018 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#4052,4053 plug mem leaks

parent 75d130cc
......@@ -144,6 +144,13 @@ ldap_ld_free(
ld->ld_options.ldo_defludp = NULL;
}
#ifdef LDAP_CONNECTIONLESS
if ( ld->ld_options.ldo_peer != NULL ) {
LDAP_FREE( ld->ld_options.ldo_peer );
ld->ld_options.ldo_peer = NULL;
}
#endif
if ( ld->ld_options.ldo_tm_api != NULL ) {
LDAP_FREE( ld->ld_options.ldo_tm_api );
ld->ld_options.ldo_tm_api = NULL;
......@@ -176,6 +183,16 @@ ldap_ld_free(
}
#endif
if ( ld->ld_options.ldo_sctrls != NULL ) {
ldap_controls_free( ld->ld_options.ldo_sctrls );
ld->ld_options.ldo_sctrls = NULL;
}
if ( ld->ld_options.ldo_cctrls != NULL ) {
ldap_controls_free( ld->ld_options.ldo_cctrls );
ld->ld_options.ldo_cctrls = NULL;
}
ber_sockbuf_free( ld->ld_sb );
#ifdef LDAP_R_COMPILE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment